Toggling one column of AutoFiltering
I have a macro that sets different columns criteria for Autofiltering,
and I have buttons set up on the button bar to activate each macro. What I would like to do is change the code so that each time I click the button, that paricular criteria would either be turned on or off, depending on it's current value. I have included a sample of one of the macros below. Sub Add_GreenZone() 'filter for the GREEN zone If Not ActiveSheet.AutoFilterMode Then ' turn on autofilter if it is off ActiveSheet.Range("a1").AutoFilter End If Selection.AutoFilter Field:=8, Criteria1:="Green" ' set the criteria End Sub So I think what I need it the ability to see if a particular column has a filter applied. Any help would be appreciated. Mike |
All times are GMT +1. The time now is 03:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com