I have a table in Google Sheets that I use to track the time elapsed between a TIME IN and a TIME OUT.
As you can see below, my TOTAL formula in D3 works, calculating the elapsed time from 5 AM to 3 PM as 10 hours. My formula in D5 fails when calculating 7 PM to 2 AM, returning 17 hours instead of the correct elapsed time of 7 hours.
TIME INandTIME OUTcolumns are formatted as automatic (time).- The
TOTALcolumn is explicitly formatted as duration[h]:mm:ss - The formula in
D3is=ABS(B3-C3)
- The formula in
D5is=ABS(B5-C5)
Why does the formula in D5 return the wrong number of hours?
| A | B | C | D | |
|---|---|---|---|---|
| 1 | ||||
| 2 | TIME IN | TIME OUT | TOTAL | |
| 3 | JIB | 5:00 AM | 3:00 PM | 10:00:00 |
| 4 | DIE | 0 | 0 | 0:00:00 |
| 5 | MA | 7:00 PM | 2:00 AM | 17:00:00 |
