Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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
  #2   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default What is the syntax for using the "IF" condition with an autofilte.

There is no such criteria, you filter using a criteria, I expect you would
have your macro to check if there are no ref errors before you apply the
filter criteria. Maybe you could explain what you are trying to do in the
first place and maybe someone here can answer that?

--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey


"peter147" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set up a commission calculation chart w/ "if" condition? Johnw Excel Worksheet Functions 2 March 10th 06 02:58 AM
Syntax for using "IF"... garry05 Excel Discussion (Misc queries) 4 December 7th 05 10:15 PM
Syntax for using "IF"... garry05 Excel Worksheet Functions 1 December 7th 05 03:44 PM


All times are GMT +1. The time now is 06:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"