Can somebody have a look at the below VBA for me and advise why i am getting an error Message: autofilter method of range class failed.
I am trying to filter a worksheet "match summaries" with the text "Back O2.5" in column CE, by the text "Back O2.5"
then copying the filtered selection into the worksheet "back O2.5"
I am trying to filter a worksheet "match summaries" with the text "Back O2.5" in column CE, by the text "Back O2.5"
then copying the filtered selection into the worksheet "back O2.5"
VBA Code:
Sub Filterselections()
Dim wsA As Worksheet: Set wsA = Sheets("Match Summaries") ' base data held here
Dim wsB As Worksheet: Set wsB = Sheets("Back O2.5")
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
With wsA.[a4:ce215].CurrentRegion
.AutoFilter 83, "=Back O2.5" 'filter rows with values O2.5 in CE
.Offset(1).EntireRow.Copy wsB.Range("A" & Rows.Count).End(3)(2) 'copy info to worksheet called Back O2.5
.AutoFilter
End With
Application.CutCopyMode = False
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub