Forum Discussion
MicheleOdell
Mar 09, 2023Copper Contributor
Calculating the average time between tasks
I have a table of date/times when a task started and when a task closed. I calculated the time between the two by using =TEXT(O3-N3,"h:mm:ss") in the TimeLapsed column. Now, I want to find the Av...
JoeUser2004
Mar 09, 2023Bronze Contributor
Write one of the following (whichever you understand best) to convert text to numeric time:
=--TEXT(O3-N3,"[h]:m:s")
or
=1*TEXT(O3-N3,"[h]:m:s")
or
=VALUE(TEXT(O3-N3,"[h]:m:s"))
Format the cells as Custom [h]:mm:ss .
Note that I use [h] instead of just h. That allows for the possibility that time exceeds or equals 24 hours.
And note that I use VALUE, not TIMEVALUE. Again, that allows for the possibility that time exceeds or equals 24.
Even if you know the possibility does not exist for your current data, it is a good habit to get into, and there is no harm in always doing it.
Also, format the AVERAGE cells as Custom [h]:mm:ss . But you might consider [h]:mm:ss.000 , since the average might include fractional seconds.