If statement formula for Time over multiple days

diazmlogistics

Board Regular
Joined
Nov 23, 2012
Messages
56
I am trying to write an if statement to populate 1 of 3 return messages. "Early", "On-Time", or "Late". The Problem is the time passes over more than one day. If we arrive between the planned arrive and planned depart, we are "On-Time". Before the planned arrive, "Early" and after the planned depart "Late". Looking for help with one formula that will work for all three scenarios.
Current formula not working:
=IF(J64="","",(IF((L64+(M$1/60/24))>=J64,(IF((L64-(1.5/24))>J64,"Early","On-Time")),"Late")))

j64=Actual Arrival
M$1=0
L64= Planned depart

Thank You
Actual Arrive
Dynamic
Planned Arrive
Static
Planned Depart
Static
Statement
23:0023:4501:15Early
00:4500:0001:30On-Time
02:1500:3002:00Late

<tbody>
</tbody>
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Actual ArrivePlanned ArrivePlanned DepartStatement
03/09/2016 23:0003/09/2016 23:4504/09/2016 01:15early
04/09/2016 00:4504/09/2016 00:0004/09/2016 01:30on time
04/09/2016 02:1504/09/2016 00:3004/09/2016 01:45late
formula in D2
=IF(AND(A2>=B2,A2<=C2),"on time",IF(A2<B2,"early","late"))
I have made the "times" into date_times
these can be formatted as times only if necessary
but must be entered as date_times

<colgroup><col><col><col><col><col span="3"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,216,107
Messages
6,128,869
Members
449,475
Latest member
Parik11

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