Combine AND and OR in IF statement

eboerma

New Member
Joined
Jan 29, 2018
Messages
1
I need to combine AND and OR in Excel IF statement and I'm not able to get the formula to return the correct answer. Any help would be greatly appreciated!!

Example:
If A1 is greater than plus or minus $50,000 AND A2 is greater than plus or minus 10%

=IF(AND(OR(BG5>50000,BH5>0.1),OR(BG5<-50000,BG5<-0.1)),"Over","Under")
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
From your description then I think you are looking to test 2 overall conditions:

1. Value A is greater than 50000 OR less than -50000
2. Value B is greater then 10% OR less than -10%

If both of these conditions evaluate to true then return "Over" else return "Under". If that's the case, you're pretty close; try this instead:

=IF(AND(OR(BG5>50000,BG5<-50000),OR(BH5>0.1,BH5<-0.1)),"Over","Under")
 
Upvote 0
Hi,

I think you just have your AND/OR mixed up:

Code:
=IF(OR(AND(BG5>50000,BH5>0.1),AND(BG5<-50000,BH5<-0.1)),"Over","Under")
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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