using IF and AND and OR

AwesomeSteph

Board Regular
Joined
Aug 18, 2017
Messages
80
Say cell E2 needs a formula that will produce a "yes" or a "no". if C2 and D2 are empty E2 should also be empty. If C2 and D2 have a no in either cell E2 should say "NO" if both have a yes or a "NO CHANGE" in both cells E2 should say "yes". I'm not sure why I can't make this work. Any suggestions are much appreciated!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi,

An initial test would be =IF(AND(C2="",D2=""),"",IF(OR(C2="No",D2="No"),"No","Yes"))

Hope this will help
 
Upvote 0
are you using it as case sensitive

and testing for all possibilities

Excel Workbook
KLMNO
11
12Table
13
14noNO
15noNO
16nono
17yesyesYES
18no changeno changeYES
19yesno changeYES
20no changeyesYES
21no change
22yes
23no change
24yes
25
Sheet1
 
Last edited:
Upvote 0
So this did work exactly the way I originally explained but once I started testing it I realized that what I need is a bit more complex.
E column should show "YES" if C and D have either both "YES" or both "NO CHANGE" really either or however if either C or D have a "NO" then E should also return with "NO" but if both C and D have "NO CHANGE" then E should show "NO"
 
Upvote 0
concatenating with & might make the task easier to expand quickly

=IF(D11&E11=LOWER("no"),"NO",IF(D11&E11=LOWER("nono"),"NO","ALT"))
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,404
Members
448,893
Latest member
AtariBaby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top