Code
Sub RangeFilter()
Dim ShowRange As Range
With Worksheets("Sheet1")
.Cells.AutoFilter Field:=4, Criteria1:=">10"
.Cells.AutoFilter Field:=3, Criteria1:=">9", Operator:=xlOr, Criteria2:="<4"
.Cells.AutoFilter Field:=5, Criteria1:=">40"
.Cells.AutoFilter Field:=6, Criteria1:=">6", Operator:=xlOr, Criteria2:="<2"
With .AutoFilter.Range
Set ShowRange = .Offset(1, 0).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible)
End With
End With
End Sub
Display More
I am using the above to identify patient results that I wish to follow up. My question is whether there is a way to select records based either on Field4 or Field3 OR field5 or field6 etc? The above syntax seems to imply criterion1 AND criterion2 and so on.
Much obliged