This code results in a message saying: "AdvancedFilter method of Range class failed".
I've been messing with this code for a couple of days now and can't figure out why it won't run. I've verified that the sheet names are the same as the ones in the code.
I'm trying to filter data from a main data sheet (BB DB) and have the filtered data sent to a separate sheet (0 x 0).
Cell "A11" is the top left cell in the list of data I want to filter, the column labels for the list are in "A10:N10". Range "A1:N2" is the filter criteria range, labels are in "A1:N1" and criteria for those labels are in "A2:N2". On sheet "0 x 0", range "A11:N11" is the labels that match the ones on sheet "BB DB".
I've been messing with this code for a couple of days now and can't figure out why it won't run. I've verified that the sheet names are the same as the ones in the code.
I'm trying to filter data from a main data sheet (BB DB) and have the filtered data sent to a separate sheet (0 x 0).
Cell "A11" is the top left cell in the list of data I want to filter, the column labels for the list are in "A10:N10". Range "A1:N2" is the filter criteria range, labels are in "A1:N1" and criteria for those labels are in "A2:N2". On sheet "0 x 0", range "A11:N11" is the labels that match the ones on sheet "BB DB".
Sub FilterBBDBToAll20PPGSheets()
Application.ScreenUpdating = False
Sheets("BB DB").Select
Range("G2").Select
ActiveCell.FormulaR1C1 = "=""=0 x 0"""
Sheets("BB DB").Range("A11").CurrentRegion.AdvancedFilter Action:=x1FilterCopy _
, CriteriaRange:=Sheets("BB DB").Range("A1:N2"), CopyToRange:= _
Sheets("0 x 0").Range("A11:N11"), Unique:=True