Hi,
i have a macro that will set a filter based on set columns
Sub test_filter()
On Error Resume Next
Application.ScreenUpdating = False
Sheets("Agent Data").Select
ActiveSheet.Range("$A$2:$EC$3061").AutoFilter Field:=4, Criteria1:= _
"Internal"
ActiveSheet.Range("$A$2:$EC$3061").AutoFilter Field:=5, Criteria1:=RGB(255 _
, 0, 0), Operator:=xlFilterFontColor
With Sheets("Internal sale Trends").DropDowns("Drop Down 1")
Sheets("Agent data").Range("$A$2:$EC$3061").AutoFilter Field:=127, _
Criteria1:=WorksheetFunction.Index(Range(.ListFillRange), .Value)
End With
With Sheets("Internal sale Trends").DropDowns("Drop Down 2")
Sheets("Agent data").Range("$A$2:$EC$3061").AutoFilter Field:=7, _
Criteria1:=WorksheetFunction.Index(Range(.ListFillRange), .Value)
End With
Application.ScreenUpdating = True
End Sub
This is working fine for what i need.
however i've been asked to add to it something do it. but it would mean the field would not be set as it depends on a different cell as to what column to filter.
so in another tab in have headings with numbers 1 to 39 from J - AV
in another tab i have the same number ranked to show the top ten, these top 10 will change based on another forumal i have set up.
i want to be able to run the filter that wil do the above code but also filter that question number (i understand i may need to have 10 different bits of code for each of the top 10)
hope this make sense.
Bookmarks