multiple if statement

beesmyer

New Member
Joined
Jan 10, 2011
Messages
11
After three days of pulling my hair out I decided to ask for your help...


I have 7 columns. First 6 with numbers last with Pass or Fail.

I want the formula in "G" to show "Fail" if columns any of the cells in coumn a,b,or c are less than 115, or if any of the cells in columns D,E, or F are below 140 or above 150. I want it to show "PASS" otherwise.

A B C D E F G
115 114 115 140 142 149 Fail
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I want the formula in "G" to show "Fail" if columns any of the cells in coumn a,b,or c are less than 115, or if any of the cells in columns D,E, or F are below 140 or above 150. I want it to show "PASS" otherwise.

Your wordings are weird.
So, if a,b,c are less than 115, AND if any of the cells in d,e,f are below 140 or above 150, what should the result be??

Moreover, what do you mean any of the cells in column A,B,C,D,E,F? Are you implicitly stating that there will only be one result cell (which is in column G)?
 
Upvote 0
This Maybe

=IF(OR(A2<115,B2<115,C2<115,D2<140,E2<140,F2<140,D2>150,E2>150,F2>150),"FAIL","PASS")
 
Upvote 0
Try this:

=IF(OR(A2 < 115, B2 < 115, C2 < 115), "FAIL", IF(OR(D2 < 140, E2 < 140, F2 < 140, D2 > 150, E2 > 150, F2 > 150), "PASS", "I DUNNO"))
 
Upvote 0
After three days of pulling my hair out I decided to ask for your help...


I have 7 columns. First 6 with numbers last with Pass or Fail.

I want the formula in "G" to show "Fail" if columns any of the cells in coumn a,b,or c are less than 115, or if any of the cells in columns D,E, or F are below 140 or above 150. I want it to show "PASS" otherwise.

A B C D E F G
115 114 115 140 142 149 Fail
Are you saying that...

G2:

=IF(OR(COUNTIF(A2:C2,"<115"),IF(SUM(COUNTIF(D2:F2,{"<140",">150"}))),"Fail","Pass")

Is this right?
 
Upvote 0
Sorry, the question is posed a little weird and incomplete, still accurate though.


I was able to get all the proposed formulas to work except this one...
=IF(OR(COUNTIF(A2:C2,"<115"),IF(SUM(COUNTIF(D2:F2,{"<140",">150"}))),"Fail","Pass")
which would have been nice considering that it's simpler. I just keep getting an error.





This is a formula out of one cell that I got from here and currently have working.

=IF(OR(P1<115,Q1<115,R1<115,S1<140,T1<140,U1<140,S1>150,T1>150,U1>150),"FAIL","PASS")
 
Upvote 0
Sorry, the question is posed a little weird and incomplete, still accurate though.


I was able to get all the proposed formulas to work except this one...
=IF(OR(COUNTIF(A2:C2,"<115"),IF(SUM(COUNTIF(D2:F2,{"<140",">150"}))),"Fail","Pass")
which would have been nice considering that it's simpler. I just keep getting an error.

..

I meant to cook up:

=IF(OR(COUNTIF(A2:C2,"<115"),SUM(COUNTIF(D2:F2,{"<140",">150"}))),"Fail","Pass")
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

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