formula utilizinf Or and AND function?

bh24524

Active Member
Joined
Dec 11, 2008
Messages
319
Office Version
  1. 2021
  2. 2007
Hi, I'm looking for a formula that might utilize both AND and OR functions but I'm not completely sure how or where. Here is what I am looking to do:

the formula is in Cell A3. If A1 reads "Test 1" and if any of C2, D2, or E2 read "true", then result is "positive". If not, result is "negative"
so if A1 does not equal "test 1", it doesn't matter if C2, D2 or E2 = "true", it would be "negative.
If A1 DOES equal "test 1" but C2 D2 or E2 do not have "True", it would be "negative"

I've tried toying around with this but I can't seem to get it. Please help. Thanks!
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Excel Formula:
=IF(AND(A1="Test 1",OR(C2, D2, E2)),"Positive","Negative")

Please try this and tell me if it gives your expected result. This assumes that the values in C2, D2, and E2 are actually boolean values (TRUE or FALSE). If they are text then you need this instead:

Excel Formula:
=IF(AND(A1="Test 1",OR(C2="true", D2="true", E2="true")),"Positive","Negative")
 
Upvote 0
You don't need OR and AND functions to solve this. Here is the formula I came up with for thr criteria specified:

=IF(A1="Test 1",IF(C2,"Positive",IF(D2,"Positive",IF(E2,"Positive","Negative"))),"Negative")
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

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