Hi all,
Please assist me on the below requirement.
> I need to Filter only blanks in Column B, Filter the date after March in Column C and i should exclude all the booked status.
I have the following code wherein it works perfectly but my challenge is sometimes I may not have March month or the booked status during those scenario, only Column B filter has to work but i am getting an error with the below code.
Please refer the attached file and the below code .
Dim rng As Range
Dim Rw As Long
Dim sh As Worksheet
Dim ws As Worksheet
Dim lastRow As Long, i As Long
Rw = Cells(Rows.Count, 1).End(xlUp).Row
ActiveSheet.AutoFilterMode = False
Set rng = Range("A1:CC1" & Rw)
With rng
.AutoFilter
.AutoFilter Field:=2, Criteria1:="=", Operator:=xlAnd
.AutoFilter Field:=3, Criteria1:= _
">3/31/2020", Operator:=xlAnd
.AutoFilter Field:=4, Criteria1:="Booked", Operator:=xlAnd
End With
Bookmarks