I would like to filter data between two dates AND blank. I could do the part for filter data between two dates, but I have trouble with filtering the blank as well. My code is as follows, please help,
Sub Filter()
Dim lngStart As Long, lngEnd As Long
Sheets(“Sheet1”).Select
lngStart = Range(“A2”).Value ‘this is the start date
lngEnd = Range(“B2”).Value + 1 ‘this is the end date
Sheets(“Sheet2”).Select
Selection.AutoFilter Field:=1, _
Criteria1:=“>=” & lngStart, _
Operator:=xlAnd, _
Criteria2:=“<=” & lngEnd
End Sub
Sub Filter()
Dim lngStart As Long, lngEnd As Long
Sheets(“Sheet1”).Select
lngStart = Range(“A2”).Value ‘this is the start date
lngEnd = Range(“B2”).Value + 1 ‘this is the end date
Sheets(“Sheet2”).Select
Selection.AutoFilter Field:=1, _
Criteria1:=“>=” & lngStart, _
Operator:=xlAnd, _
Criteria2:=“<=” & lngEnd
End Sub