I have two worksheets. In worksheets("Dashboard") I have a dropdown list based on a table in worksheets("yearly View"). I am trying to filter this table based on the value in the drop down list in worksheets("Dashboard").
The code I have created is failing.
The drop down list in worksheets("Dashboard") is location in Range("AL1"). The column to be filtered is on worksheets("Yearly View").Range("P3").
Please see my code below:
Sub Filter_Table()
Worksheets("Yearly View").Range("P3").Select
Worksheets("Yearly View").Range("$P$3:$AR$24").AutoFilter Field:=1, Criteria1:= _
Worksheets("Dashboard").Range("AL1")
ActiveSheet.Range("$P$3:$AR$24").AutoFilter Field:=1
End Sub