AND OR Nested Formula

spycein

Board Regular
Joined
Mar 8, 2014
Messages
135
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I have the following table

[TABLE="class: grid, width: 192"]
<tbody>[TR]
[TD="width: 64"]A1[/TD]
[TD="width: 64"]B1[/TD]
[TD="width: 64"]C1[/TD]
[/TR]
[TR]
[TD]Black[/TD]
[TD]White[/TD]
[TD]Yellow[/TD]
[/TR]
</tbody>[/TABLE]

i need a formula using "AND OR" in D1 which would return me the value as "Pass" or "Fail" according to the following condition.

If I select "Black" in cell "A1", "white" in cell "B1" and "Yellow" in Cell "C1" then Cell "D1" would return the value as pass.
If I select "Black" in cell "A1", "white" in cell "B1" and "Green" in Cell "C1" then Cell "D1" would return the value as pass.
If I select "Black" in cell "A1", "white" in cell "B1" and "Blue" in Cell "C1" then Cell "D1" would return the value as pass.

If I select "Black" in cell "A1", "white" in cell "B1" and if i select any other colour name except Yellow/Green/Blue in Cell "C1" then Cell "D1" would return the value as fail.

If I select any other colour name except "black" in cell "A1", any other colour name except "white" in cell "B1" and if i select "Blue" or "Yellow" or "Green" in "C1" then Cell "D1" would return the value as fail.

Hope i made my points clear.

Thanks
 
Last edited:
Think I follow the logic
try...=IF(AND(A1="Black",B1="White",OR(C1="Yellow",C1="Green",C1="Blue")),"Pass","Fail")
 
Upvote 0

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