I am trying to create a delivery driver log that automatically populates the discrepancy between expected return time and actual return time. So if a driver is expected to return at 2pm, but they return at 2:15pm, then I would like to see 15 in the discrepancy column. Inversely if the ETA is 2:15pm and they return at 2pm I want to see -15 as the discrepancy.
1 Answer
Subtraction, like =A2 - B2
, works: you just have to format the cell with this formula as Duration.
By default, duration is displayed as 0:15:00 or -0:15:00 when negative. If seconds are not desired, select the cell and go to Format -> Number -> More formats -> More date and time formats and delete the fields you do not need from the format window.
-
Yea... I got into trying to code the cell I didn't even look there. I know there are lots of time formats, but I didn't know about the "elapsed" formats. Thank you so much!!– RobertCommented Apr 2, 2018 at 16:48