View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Daniel Bonallack Daniel Bonallack is offline
external usenet poster
 
Posts: 110
Default Filter and unfilter

I have a very simple macro that saves the user from having to go to the
custom autofilter:

Selection.AutoFilter Field:=8, Criteria1:="<Holiday", Operator:=xlAnd

I want to switch this to a toggle - so that if field 8 is already filtered,
then it will run the command

Selection.AutoFilter Field:=8

What is the IF statement to use to determine if field 8 is already filtered?

Thanks in advance
Daniel