![]() |
IF(OR FUNCTION
The following formula works okay for me, but I want o expand the statement to
include two more names, ie. I want the same results that I get when "DUNN" is entered for "JANE" and "THOMPSON". How can I connect them? =IF(OR(D14,D15="DUNN")*AND(D10,D11="DUNN"),"VIOLAT ION!","") Any help is appreciated. Renee |
IF(OR FUNCTION
I don't understand your current formula. What is D14 and D10 supposed to
represent. The IF statement using OR has no condition to meet for D14. But with the way you have it set up, I would assume something like: =IF(OR(D14,D15="DUNN",D15="JANE",D15="THOMPSON")*A ND(D10,D11="DUNN",D11="JANE",D11="THOMPSON"),"VIOL ATION!","") HTH, Paul "Renee" wrote in message ... The following formula works okay for me, but I want o expand the statement to include two more names, ie. I want the same results that I get when "DUNN" is entered for "JANE" and "THOMPSON". How can I connect them? =IF(OR(D14,D15="DUNN")*AND(D10,D11="DUNN"),"VIOLAT ION!","") Any help is appreciated. Renee |
IF(OR FUNCTION
"Renee" wrote:
The following formula works okay for me, but I want o expand the statement to include two more names, ie. I want the same results that I get when "DUNN" is entered for "JANE" and "THOMPSON". How can I connect them? =IF(OR(D14,D15="DUNN")*AND(D10,D11="DUNN"),"VIOLAT ION!","") The OR() condition is true when D14 is non-zero (i.e. not FALSE) or D15 contains "DUNN". The AND() condition is true when D10 is non-zero and D11 contains "DUNN". So you could write: =if(or(D14,D15="DUNN",D15="JANE",D15="THOMPSON") * and(D10,or(D11="DUNN",D11="JANE","THOMSPON")), "VIOLATION!", "") |
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. |
All times are GMT +1. The time now is 02:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com