Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Time fields in Excel 1

Status
Not open for further replies.

ranebow

Programmer
Mar 8, 2003
110
US
Trying to add cells in an Excel spreadsheet that are formated by HH:MM:SS. When totaling I get strange results. When going over 24 hours I'd like it to display Days:HH:MM:SS. Is this possible?
 
Format > Cells, on the Numbers tab, choose Custom from the left column, then type in
[attn][d] hh:mm:ss[/attn]
Or, if you'd like to see the total number of hours, type in
[attn][h]:mm:ss[/attn]

The brackets around "[h]" tell Excel to display the total number of hours, not just the remainder after converting 24-hour periods to days.

Example:[tt]
20:00:00
+ 6:00:00

2:00:00 [/tt]when formatted as hh:mm:ss, because the first 24 hours count as one day, and that leaves 2 hours.

BUT
[tt]
20:00:00
+ 6:00:00

26:00:00 [/tt]when formatted as [h]:mm:ss

The answer is actually always the same, you are only changing how it is displayed.

See faq68-5827, "Why do Dates and Times seem to be so much trouble?" for more details on how Excel deals with times.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Those are both good threads but I don't think it answered my question.
Col A has beginning time
Col B has ending time
Col C has the difference between the two (and is formatted correctly)
Now I want to total column C. This may add up to 700 hours but I can't get it to look like 29 days & so many hours.
 
Thanks anotherhiggins! I think this is exactly what I'm looking for!
 
I just realized that I included brackets around the "d" - that should read
[attn]d hh:mm:ss[/attn]
without the brackets.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top