PDA

View Full Version : Multiple Filter



ProteanBeing
02-12-2008, 09:12 AM
I would like to be able to filter a column by more than 2 requirements.
(ie column = x, column = y, column = z)

Bob Phillips
02-12-2008, 12:13 PM
Sub Filter3Conditions()
Dim mpLastRow As Long

With ActiveSheet

mpLastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
.Columns(2).Insert
.Range("B1").Value = .Range("A1").Value
.Range("B2").Value = "a"
.Range("B3").Value = "b"
.Range("B4").Value = "c"
.Range("A1").Resize(mpLastRow).AdvancedFilter _
Action:=xlFilterInPlace, _
CriteriaRange:=.Range("B1:B4"), Unique:=False
.Columns(2).Delete
End With
End Sub