R
Randy Reese
HELP!!!!
I am trying to keep every row that has Str in column B and "a" in column A.
Sub Copy_With_AutoFilter2(WS As Worksheet, WS2 As Worksheet, Str As String,
LRow As Long)
With WS.Columns("a:a")
.AutoFilter Field:=2, Criteria1:=Str, Operator:=xlAnd, Field:=1,
Criteria2:="a"
WS.Range("D:F").Cells.SpecialCells(xlCellTypeVisible).Copy _
WS2.Range("B" & LRow)
End With
WS.AutoFilterMode = False
End Sub
I am trying to keep every row that has Str in column B and "a" in column A.
Sub Copy_With_AutoFilter2(WS As Worksheet, WS2 As Worksheet, Str As String,
LRow As Long)
With WS.Columns("a:a")
.AutoFilter Field:=2, Criteria1:=Str, Operator:=xlAnd, Field:=1,
Criteria2:="a"
WS.Range("D:F").Cells.SpecialCells(xlCellTypeVisible).Copy _
WS2.Range("B" & LRow)
End With
WS.AutoFilterMode = False
End Sub