With this code I simply (Thanks to Slai) copy and paste a filtered range from one sheet to another. However I attempted to replicate this code by appending another filtered range to the HAA sheet but for some reason it selects row 11 and pastes the data.
Sub Run()
Application.ScreenUpdating = False
Dim x As Long
Dim rf As Range, wsTo As Worksheet, wx As Range
Set rf = ThisWorkbook.Sheets("Table").UsedRange
Set wsTo = Sheets("HAA")
Set wx = ThisWorkbook.Sheets("HAA").UsedRange
x = Range("B" & Rows.Count).End(xlUp).Row
rf.AutoFilter
rf.AutoFilter 12, "associated"
rf.Copy
wsTo.Range("A1").PasteSpecial xlPasteValues
rf.AutoFilter
rf.AutoFilter 12, "not found"
rf.Offset(1, 0).Copy
I changed this (below) to select to see where it was pasting the data, originally had .PasteSpecial xlPasteValues
wsTo.Range("A1" & x).Select
Application.ScreenUpdating = True
End Sub
x = wsTo.Range("B" & Rows.Count).End(xlUp).OFFSET(1, 0).Row
It looks like it should bewsTo.Range("A" & x).Select
. – user4039065