Filter Data Using Autofilter In VBA

1) Range("a1").AutoFilter Field:=int_Status, Criteria1:="Open"

2) Filter US Format Dates
Range("a1").AutoFilter Field:=int_Due, Criteria1:="<" & Format(Date, "mm-dd-yyyy")

3) Filter US Format Dates and Blank Cells 
Range("a1").AutoFilter Field:=int_Due, Criteria1:="<" & Format(Date, "mm-dd-yyyy"), Operator:=xlOr, Criteria2:="="

4) Filter US Format Dates and Non-Blank Cells 
Range("a1").AutoFilter Field:=int_Due, Criteria1:="<" & Format(Date, "mm-dd-yyyy"), Operator:=xlOr, Criteria2:="<>"

5) Filter Multiple Values
Range("a1").AutoFilter Field:=5, Criteria1:=Array("10", "20","59"), Operator:=xlFilterValues

Comments

Popular posts from this blog

Power Automate - Automatically fetch data from Power BI in to Excel and Send the copy of the Excel file via Email

Function to Paste Excel Range on Outlook Mail Body (In text not image) Function Name - rngHTML()

Separate Text (Characters) & Numbers from Alpha Numeric String Using Formula and Macro (VBA)