If/Then statement

osaben

Board Regular
Joined
Mar 17, 2010
Messages
62
Office Version
  1. 365
Platform
  1. Windows
I am looking for some expertise on a formula in cell E15 that would look at data in cell A1 or A2 ad return an answer.


[TABLE="width: 245"]
<tbody>[TR]
[TD="width: 326, bgcolor: transparent, colspan: 3"]Cell #A1 – can possibly be blank, YES, NO or NA
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, colspan: 3"]Cell #A2 – can possibly be blank, YES, NO or NA




[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, colspan: 3"]If either A1 or A2 is blank; then leave cell blank.
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, colspan: 3"]If both A1 and A2 are YES; then “Separate”
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, colspan: 3"]IF only A2 is YES; then “Terminate”
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, colspan: 3"]If both A1 & A2 are NO; the “Add”
[/TD]
[/TR]
</tbody>[/TABLE]

Please and Thank You in advance for your help!
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
=IF(OR(A1="",A2=""),"",IF(AND(A1="yes",A2="yes"),"Separate",IF(A2="yes","terminate",IF(AND(A1="no",A2="no"),"Add"))))
 
Upvote 0
Thanks for your willingness to help dheeeraj27.

This solution seems to work for when both A1 and A2 are both yes or no. However when only A2 is yes, it returns FALSE rather than "Terminate"
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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