Sameer.k21
Member
Hi,
I have this code which works perfect. However I now have about 40files and each file will have different start dates. Do I have to go to each file and specify the start date in the range for this code to pick up or is there another way around?
Regards,
Sameer
I have this code which works perfect. However I now have about 40files and each file will have different start dates. Do I have to go to each file and specify the start date in the range for this code to pick up or is there another way around?
Code:
Public Sub MyFilter()
Dim lngStart As Long, lngEnd As Long
lngStart = Range("AA4").Value 'assume this is the start date
lngEnd = Range("AA5").Value 'assume this is the end date
Range("E:E").AutoFilter field:=1, _
Criteria1:=">=" & lngStart, _
Operator:=xlAnd, _
Criteria2:="<=" & lngEnd
End Sub
Regards,
Sameer