if((and('1'!m21>.1,m21<1)),"X",(if((or((and('1'!m22>.1,m22<50))),"X",(if((or((and('1'!m23>.1,m23<1000))),"X",(if((or((an d('1'!>.1,m24<3))),"X"

jaedmar

Board Regular
Joined
Feb 14, 2011
Messages
60
I have figured out how to both AND and OR functions, and can even do either with multiple conditions.
I am having a hard time trying to put multiple AND and multiple OR conditions in same formula.

=if((and('1'!m21>.1,m21<1)),"X",(if((or((and('1'!m22>.1,m22<50))),"X",(if((or((and('1'!m23>.1,m23<1000))),"X",(if((or((and('1'!>.1,m24<3))),"X"

This is what I've got, but I am sure it isn't right.
The intent is to yield an "X" if any of four conditions exists. Each condition has both a lower and upper limit:
M21 >.1 and <1
M22 >.1 and <50
M23 >.1 and M23 <1000
M24 >.1 and M24 <3

Is that written even close to right?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Try ~ No need for the sheet reference if Column M is on the same sheet as the formula.

Code:
=IF(OR(AND(M21>0.1,M21<1),AND(M22>0.1,M22<50),AND(M23>0.1,M23<1000),AND(M24>0.1,M24<3)),"X","")

The AND() statements tests to see if each cell evaluates to true or false, the Or()
statement tests to see if any of the AND() statements are true, if any AND() statements
are true it gives "X", if all AND() statements are false it leaves the formula cell empty.
 
Upvote 0
Column M is actaully from another sheet. So, how would I write the same thing referencing Column M from a sheet entitled "1"?

Here is what I tried, but didn't work:
=IF(OR(AND('1'!M21>0.1,M21<1),AND('1'!M22>0.1,M22<50),AND('1'!M23>0.1,M23<1000),AND('1'!M24>0.1,M24<3)),"X","")

That yielded "#N/A".
 
Upvote 0
Code:
=IF(AND('1'!M21>0.1,'1'!M21<1),"X",IF(AND('1'!M22>0.1,'1'!M22<50),"X",IF(AND('1'!M23>0.1,'1'!M23<1000),"x",IF(AND('1'!M24>0.1,'1'!M24<3),"x",""))))
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,833
Members
452,947
Latest member
Gerry_F

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