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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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:office:office" /><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,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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