Refresh Autofilter

B

BKO

Hello, smart friends

After changing of reference data the autofilter option is NOT refreshed.

Is it possible to refresh the autofilter by activating the (filtered) sheet?

Thanks in advance
 
B

Bernie Deitrick

BKO,

You could use the calculate event: record a macro where you filter the data, and then pop it into
the calculate event, along the lines of

Private Sub Worksheet_Calculate()
Range("E1:G20").AutoFilter Field:=1, Criteria1:="<>0"
End Sub

When any data that is linked into the table is updated, the filter will be reapplied. Copy the code
above, right-click the sheet tab, select "View Code" and paste the code into the window that
appears. Update the range address, field # and criteria....

HTH,
Bernie
MS Excel MVP
 
Top