Multiple If statements based on multiple criteria

EJohnson99202

New Member
Joined
Nov 7, 2017
Messages
7
Hello all -

I have a statement that has be stumped. I am looking for a true condition based on multiple criteria, however, the formula needs to stop at the first result if true.

I have four columns. Column A is Number of Days. Column B, C and D and Number of Test Days. What I need is for Column A to check against Columns B - D (starting with D) and stopping if a value is filled. Here are examples:

[TABLE="width: 735"]
<colgroup><col span="5"><col></colgroup><tbody>[TR]
[TD]#Days[/TD]
[TD]TestB[/TD]
[TD]TestC[/TD]
[TD]TestD[/TD]
[TD]Result[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]35[/TD]
[TD]48[/TD]
[TD]48[/TD]
[TD]34[/TD]
[TD]TRUE[/TD]
[TD]Reports True because 35 is greater than Test D[/TD]
[/TR]
[TR]
[TD]35[/TD]
[TD]48[/TD]
[TD]34[/TD]
[TD]48[/TD]
[TD]FALSE[/TD]
[TD]Reports False because formula stops after verifying Test D[/TD]
[/TR]
[TR]
[TD]35[/TD]
[TD]48[/TD]
[TD]34[/TD]
[TD][/TD]
[TD]TRUE[/TD]
[TD]Reports True becauseTest D is blank and 35 is greater than Test B[/TD]
[/TR]
</tbody>[/TABLE]


This is the formula I am using:

=IF(OR(D2="",C2="",A2>B2),"1",IF(C2="","",IF(A2>C2,"1",IF(D2="","",IF(A2>D2,"1","")))))


Thank you in advance!!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
For the example you gave, in E1, I get TRUE for row 1 (A1 = 35, D1 =34), FALSE for row 2 and TRUE for row 3 using suggested formula.

Changing A1 to 30 or D1 to 37 both return FALSE
 
Last edited:
Upvote 0
Based on the formula I posted:

=IF(OR(D2="",C2="",A2>B2),"1",IF(C2="","",IF(A2>C2,"1",IF(D2="","",IF(A2>D2,"1","")))))

I am getting True for all three rows. Row 2, with Test D at 48, should report False as it is less than Column A of 35.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,206
Members
452,618
Latest member
Tam84

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