Nov 06 2022 11:20 PM - edited Nov 06 2022 11:24 PM
I have dataset with time recorded in AM/PM format. I am trying to find the duration by substracting from one from another. But it gives error when the time time overlaps to another day.
Here is the link to the work book.
https://drive.google.com/file/d/1ygEjTenMBbHDh0furXEcLjHyWoGc_43k/view?usp=sharing
Nov 06 2022 11:27 PM
SolutionNov 07 2022 01:51 AM
Nov 07 2022 03:08 AM
Nov 07 2022 04:05 AM
@AlexMN1920 First you need to understand that times are in fact numbers. 11PM equals 23 hours into a 24-hour day. Thus, 23/24 = 0.958333
The picture below is just an example of how that works. Look into the MS support pages for MOD function to see how that function works. I can't really describe it better myself.
On row 4 you see the calculation in a Number format. The MOD function returns a positive number 0.083333. Multiply this number by 24 and you get 2 (hours). Or just format the number 0.083333 as Time to return 02:00.
Nov 07 2022 09:06 AM
Nov 06 2022 11:27 PM
SolutionChange the formula for Duration to:
=MOD(C2-B2,1) and copy it down.