Link to home
Start Free TrialLog in
Avatar of Ian Bell
Ian BellFlag for United Kingdom of Great Britain and Northern Ireland

asked on

AND/OR FUNCTION

Hi,
Can you please help with AND/OR function
LOGIC
IF A1 = abcd  AND B1 = blue  then 99
OR
IF A1 = abcd AND B2 = yellow then 99
otherwise zero  
Many thanks
Ian
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

=if(and(A1="abcd",or(b1="blue",b2="yellow")),99,0)
Avatar of Ian Bell

ASKER

Thanks Saqib
If I wanted to return 99 if A1 =abcd and B1 <> blue  OR   B1 <> yellow
how would the formula look ?
* no B2 cell this time.
Just change b2 to b1

=if(and(A1="abcd",or(b1="blue",b1="yellow")),99,0)
I was wanting it to return 99 only if b1 did not contain "blue" or "yellow" and zero if contained blue or yellow........ A1 should always be abcd
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I did change the question from = to <> so apologies for that.
Thanks to both of you.
Ian
I was trying to place the OR function and that is where I got into a mess.
You're welcome Ian. Glad it worked as desired in the end. :)