Page 1 of 1

[Solved] How to sum times expressed in HH:MM:SS

Posted: Thu Apr 29, 2010 4:41 pm
by krige
What's the formula to know the total amount of time resulting from the sum of the times stored in cells in HH:MM:SS format?

For example: given a few cells containing 0:02:23, 1:50:01, 0:00:10

How do you get their total time in HH:MM:SS?
And how do you get their total time in seconds?

Re: How to sum times expressed in HH:MM:SS

Posted: Thu Apr 29, 2010 4:56 pm
by Robert Tucker
If they are in A1, B1 and C1 then the sum is =SUM(A1:C1) with all cells formatted to time HH:MM:SS.

To convert to seconds multiply by 24*60*60.

Re: How to sum times expressed in HH:MM:SS

Posted: Thu Apr 29, 2010 6:13 pm
by krige
Robert Tucker wrote:If they are in A1, B1 and C1 then the sum is =SUM(A1:C1) with all cells formatted to time HH:MM:SS.

To convert to seconds multiply by 24*60*60.
That's the first thing I tried but didn't work, the result showed zero or some other weird result.

Now I see the problem was due to the content of cells: I don't know why, some of them contained a leading apostrophe. Removing the apostrophe fixed the problem.

Thank you very much :)

Re: [Solved] How to sum times expressed in HH:MM:SS

Posted: Thu Apr 29, 2010 8:21 pm
by Robert Tucker
A leading apostrophe means the figures were entered as text.

I should possibly have explained, although it is now probably obvious, that time is stored as a number representing days and/or parts thereof.

Re: [Solved] How to sum times expressed in HH:MM:SS

Posted: Thu Apr 29, 2010 8:59 pm
by Villeroy
krige is Italian. Italian time format has points as in 12.34.56
12:34:56 is not recognized as a time in Italian locale context.