Excel Filtering and Copying in VBA

You need to split this into two parts. Filter and then copy/ paste. See below:

With Sheet3
    .AutoFilterMode = False
    With .Range("F4:F500")
        .AutoFilter Field:=1, Criteria1:="Riveter 01"
        .SpecialCells(xlCellTypeVisible).Copy Destination:=Sheet2.Range("A5")
    End With
End With

to remove the filter:

On Error Resume Next
    Sheet3.ShowAllData
On Error GoTo 0

On Error Resume Next is for when there is no filter present to skip the error. Please note the use of Sheet3 and Sheet2 for those looking for a generic solution.

Tags:

Excel

Vba

Filter