Autofilter for multiple columns in excel VBA
问题 Can you please let check what is the error in below vba macro? Trying to autofilter two columns based on criteria. I am not able to filter field 8 and field 9 based on below code. Worksheets("Demo_Sheet").Activate With Worksheets("Demo_Sheet").Range("A1") .AutoFilter field:=8, Criteria1:="<=" & Format(Now() + 5, "m/d/yyyy"), Criteria2:=">=" & Format(Now() - 5, "m/d/yyyy"), Operator:=xlAnd .AutoFilter field:=9, Criteria1:=">=.95" End With Range("A1").CurrentRegion.Copy 回答1: this gave me an