Hi all,
Good day for you all.......
I run this code get run-time error "1004" Autofiter method of range class failed
Public Sub MyFilter()
Dim lngStart As Long, lngEnd As Long
lngStart = Range("m1").Value 'assume this is the start date
lngEnd = Range("m2").Value 'assume this is the end date
Range("I1:I1500").AutoFilter Field:=6, _
Criteria1:=">=" & lngStart, _
Operator:=xlAnd, _
Criteria2:="<=" & lngEnd
I Need filter data b/w date cell m1 and m2
Good day for you all.......
I run this code get run-time error "1004" Autofiter method of range class failed
Public Sub MyFilter()
Dim lngStart As Long, lngEnd As Long
lngStart = Range("m1").Value 'assume this is the start date
lngEnd = Range("m2").Value 'assume this is the end date
Range("I1:I1500").AutoFilter Field:=6, _
Criteria1:=">=" & lngStart, _
Operator:=xlAnd, _
Criteria2:="<=" & lngEnd
I Need filter data b/w date cell m1 and m2