or:
Code:
Sub M_snb()
sn = Range("B1:B3")
sp = Filter(Filter(Filter(Application.Transpose(Range("A1:A1000")), sn(1, 1), False), sn(2, 1), False), sn(3, 1), False)
Cells(1, 8).Resize(UBound(sp) + 1) = Application.Transpose(sp)
End Sub
or:
Code:
Sub M_snb_002()
sn = Range("B1:B3")
sp = Columns(1).SpecialCells(2)
For j = 1 To UBound(sp)
If (sp(j, 1) = sn(1, 1)) + (sp(j, 1) = sn(2, 1)) + (sp(j, 1) = sn(3, 1)) = 0 Then c00 = c00 & "_" & j
Next
sp = Application.Index(sp, Split(Mid(c00, 2), "_"), 1)
Cells(1, 10).Resize(UBound(sp)) = Application.Transpose(sp)
End Sub
Does this amendment make any difference ?
Code:
Sub M_snb()
sn = Range("B1:B3")
For Each it In sn
Columns(1).specialcells(2).Replace it, "", 1
Next
columns(1).specialcells(4).entirerow.delete
End Sub
Bookmarks