IF(AND(OR multi step fx help needed

brose99

New Member
Joined
Jun 16, 2018
Messages
35
ABC
123-1451
2-71140
3351301
4-22-127

<tbody>
</tbody>

How do you write a proper IF(AND(OR fx in cell C1 that I can drag down thru C4 that states:
if the number in cell A1 is >0 and <50 AND
the number in cell B1 is >-150, <-109 *OR* >109, <150,
then cells C1 populates a 1 if it does, and a "" if it doesn't?

I hope I explained that ok.

The final results should have a 1 in C1 and a 1 in C3


Thanks in advance for any help!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Bạn thử công thức:
=IF(A1="","", ((A1> 0) * (A1 <50)) * ((B1> -150) * (B1 <-109) + (B1> 109) * (B1 <150)))
 
Last edited:
Upvote 0
How about:



=IF(AND(A1>0,A1<50,OR(AND(B1>-150,B1<-109),AND(B1>109,B1<150))),1,"")
 
Upvote 0
I'm glad to help you. Thanks for the feedback.

Quick updated question, Dante...

I need to update the first portion of the above IF(OR(AND fx so that it also includes all numbers greater than or equal to 175. For example: A1>0, A1<50 OR A1>=175

The 2nd portion of the formula *...OR(AND(B1>-150,B1<-109),AND(B1>109,B1<150))),1,"") * will remain the same.

I've tried tinkering with the first part of this fx to make this adjustment and I keep messing it up. I know it's a simple fix for someone much better than me. Can you, or anyone else, assist me with this, please?

Thanks!
 
Upvote 0
Try:

=IF(AND(OR(AND(A1>0,A1<50),A1>=175),OR(AND(B1>-150,B1<-109),AND(B1>109,B1<150))),1,"")
 
Upvote 0
Try:

=IF(AND(OR(AND(A1>0,A1<50),A1>=175),OR(AND(B1>-150,B1<-109),AND(B1>109,B1<150))),1,"")

The formula looks right, and it doesn't give me an error message when I type it in, but it's still not picking up any number >=175 in A1. Hmmmm.....
 
Upvote 0
Still having the same issues. I double checked my work and its typed in correctly.

Does it matter which IF(AND(OR fx comes first? Because due to formatting issues, I had to flip/flop columns A&B from my original message. The new data set looks like this:
ABC
1-145231
214071
3130351
4-127-22




<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,213,513
Messages
6,114,072
Members
448,546
Latest member
KH Consulting

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