Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 418
Default IF(OR FUNCTION

PS....

I wrote:
=if(or(D14,D15="DUNN",D15="JANE",D15="THOMPSON") *
and(D10,or(D11="DUNN",D11="JANE","THOMSPON")), "VIOLATION!", "")


It just occurred to me.... Since you are accustomed to
OR(...)*AND(...) instead of the more customary AND(OR(...),AND(...)),
you could avoid the nested AND(...,OR(...)) above by doing the
following:

=if(or(D14,D15="DUNN",D15="JANE",D15="THOMPSON") * (D10<0) *
or(D11="DUNN",D11="JANE","THOMSPON"), "VIOLATION!", "")

Of course, you could really go crazy and replace OR() with an
expression using "+". But I think that's taking the paradigm too far
in this context. Either of the above do not sacrifice readability,
IMHO.

 
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



All times are GMT +1. The time now is 12:24 AM.

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

About Us

"It's about Microsoft Excel"