Calculating time against deadline, across midnight

jwhacks

New Member
Joined
Mar 7, 2012
Messages
2
I'm trying to calculate time against a deadline (early or late) in minutes using military time format such as:

Deadline = 15:00
Actual = 15:20
Variance = 0:20

or

Deadline 15:00
Actual = 14:50
Variance = -0:10

However when the actual time crosses midnight the variance is incorrect. So I need to find some type of solution to calculate time variance either before the deadline, after the deadline, or after the deadline when past midnight. I'm stumped. Any suggestions would be gratefully appreciated.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Thanks for the welcome. This forum will be useful.

I’ve tried your suggestion. Here is what I get when trying different actual variables:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p> </o:p>
EX 1 Correct
B16 = 17:50 (deadline)
B17 = 17:55 (actual – later than deadline)
B18 = 0:05 (minutes early/late (using =MOD(b17-b16,1))
<o:p> </o:p>
EX 2 Correct
B16 = 17:50 (deadline)
B17 = 0:10 (actual – later than deadline and after midnight)
B18 = 6:20 (minutes early/late (using =MOD(b17-b16,1))
<o:p> </o:p>
Ex 3 Incorrect
B16 = 17:50 (deadline)
B17 = 17:45 (actual – earlier than deadline)
B18 = 23:55 (minutes early/late (using =MOD(b17-b16,1))
<o:p>Want this to result in -0:05. </o:p>
<o:p> </o:p>
When the actual crosses midnight the result is incorrect. Any ideas? Thanks.
 
Upvote 0

Forum statistics

Threads
1,215,856
Messages
6,127,362
Members
449,381
Latest member
Aircuart

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