AND or OR

montanaaggie

Board Regular
Joined
Nov 11, 2005
Messages
124
Office Version
  1. 365
Platform
  1. Windows
In cell A1: I want to have an equation that will display the value in G1 if meets one of the two conditions. If it doesn't I want it to display a 0.


1): B1="Yes"
or
2): C1="Yes" and D1="Yes"


I tried in A1 the following: =IF(AND(B1="yes",OR(C1="yes",D1="yes")),G1,0)
That doesn't appear to generate the expected returning. Meaning B1 did say yes, but it still populated a 0 for A1
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Just a slight bit off on your nests:

=IF(OR(B1="Yes",AND(C1="Yes","D1="Yes")),G1,0)
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,917
Members
452,949
Latest member
beartooth91

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