Multiple AND and OR statements with same outcome

komhs

New Member
Joined
Jun 12, 2016
Messages
44
Office Version
  1. 2016
Platform
  1. Windows
Hi to all and thanks in advance for trying to help.

In the columns A, B, C, I have typed all the possible pair scenarios that I want to add to the D1 cell.

My problem is:

I want to type an IF formula to D1 Cell (in this particular circumstance, the outcome is "yes") with the following logical statement: If (A1=1 and B1 is -2,25 with C1<=-2 OR B1=-1,25 with C1=1 OR B1=-0,25 with C1=0 OR B1=0,75 with C1=-1 OR B1=1,75 with C1=-2 OR B1=2,75 with C1>=3) then "Yes". I don't have an "else" after "then", because I want to add more similar functions in D1 cell with some other pairs which have some other outcome (in this example it was "Yes").

ABCD
1​
1-2,25-2"YES"
2​
1-1,251"YES"
3​
1-0,250"YES"
4​
10,75-1"YES"
5​
11,75-2"YES"
6​
12,753"YES"

Thanks in advance for your help
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
nested IF
OR (
AND (A1=1 ,B1 = -2,25, C1<=-2 ),
AND( A1=1,B1=-1,25 ,C1=1 ),
AND( A1=1, B1=-0,25, C1=0 ),
AND( A1=1 , B1=0,75 , C1=-1 ),
AND(A1=1, B1=1,75 , C1=-2),
AND( A1=1,B1=2,75 ,C1>=3)
)

Add that to an IF
=IF ( OR ( AND (A1=1 ,B1 = -2,25, C1<=-2 ), AND( A1=1,B1=-1,25 ,C1=1 ), AND( A1=1, B1=-0,25, C1=0 ), AND( A1=1 , B1=0,75 , C1=-1 ), AND(A1=1,B1=1,75 , C1=-2), AND( A1=1,B1=2,75 ,C1>=3) ) , "Yes", IF( next test , True, False ))
 
Upvote 0
Solution
nested IF
OR (
AND (A1=1 ,B1 = -2,25, C1<=-2 ),
AND( A1=1,B1=-1,25 ,C1=1 ),
AND( A1=1, B1=-0,25, C1=0 ),
AND( A1=1 , B1=0,75 , C1=-1 ),
AND(A1=1, B1=1,75 , C1=-2),
AND( A1=1,B1=2,75 ,C1>=3)
)

Add that to an IF
=IF ( OR ( AND (A1=1 ,B1 = -2,25, C1<=-2 ), AND( A1=1,B1=-1,25 ,C1=1 ), AND( A1=1, B1=-0,25, C1=0 ), AND( A1=1 , B1=0,75 , C1=-1 ), AND(A1=1,B1=1,75 , C1=-2), AND( A1=1,B1=2,75 ,C1>=3) ) , "Yes", IF( next test , True, False ))
Thank you so much for the solution!
 
Upvote 0

Forum statistics

Threads
1,215,500
Messages
6,125,166
Members
449,210
Latest member
grifaz

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