This Excel macro filters data in Excel to display results that contain 1 of 2 possible values. This macro uses the xlor operator and that means that a result can contain one value OR another value. This is a great macro to use to narrow long lists or data sets down to compare two separate items side by side.
To use this macro simply replace the "Enter Criteria Here" text with your own criteria and update the field number. This is a pretty easy to use and yet powerful feature in Excel and in Excel macros.
All of the elements below often appear within autofilter macros.
Range
Field
Criteria
Operator
Sub AutoFilter_in_Excel_OR_Operator_One_Field()
Range("A1").AutoFilter Field:=1, Criteria1:="Enter Criteria Here", Operator:=xlOr, Criteria2:="Enter Criteria Here"
End Sub