Link to home
Start Free TrialLog in
Avatar of sq30
sq30

asked on

Autofilter criteria from cell and refresh at cell change

Hello,

I'd like the code below to be able to pick up the autofilter criteria from cell A1 and re run this code everytime the value in cell A1 changes.

Thanks in advance

Private Sub filter()

    Sheets("filter").Select
    
    With ActiveSheet
        .AutoFilterMode = False
        .Range("A17:J42").AutoFilter Field:=6, Criteria1:="A1"
                
    End With
                
End Sub

Open in new window

test-filter.xlsm
ASKER CERTIFIED SOLUTION
Avatar of nutsch
nutsch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sq30
sq30

ASKER

Excellent - Thanks for the quick response
Glad to help, thanks for the grade.

Thomas