View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
peter147
 
Posts: n/a
Default What is the syntax for using the "IF" condition with an autofilte.

I want to write a macro that applies .AutoFilter to a range,
I have got this far
" Selection.AutoFilter Field:=1, Criteria1:="#REF!", Operator:=xlAnd"

BUT what is the syntax when "#REF!" does not apear in the filtered list so I
can return the list to the original condition and not make any changes?
Thank you
Peter147