Totals column thinks it's 24 hr clock & shows 01h31m instead of 25h31m. Fix?

  • Thread starter Thread starter StargateFan
  • Start date Start date
S

StargateFan

A spreadsheeI that allows me to enter hours is not adding up correctly
in the totals column. It adds up correct up to but not including 24
hours but after that the total deletes that 24 hoursl It seems Excel
is mistaking this for the 24 hours clock system and doesn't realize
that it must show the total. i.e., after deleting 3 rows above the
totals column I get a total of 23h16m but then after the next row, it
shows less than 1 hour with the final total of all the rows showing
01h31m. That should actually show 25h31m.

Is there a way to get Excel to actually add up the hours instead of
doing what it's doing?

oh, btw, the code is this for the totals cell:

=TIME(HOUR(SUM(K16:K41)),ROUND(MINUTE(SUM(K16:K41))/15,0)*15,0)

Thanks!
 
Wow! No need for that, if the values are time values you can just use

=ROUND(SUM(K16:K41)*96,0)/96

to round to the nearest quarter

btw, time can only handle up to 24 hours


--
Regards,

Peo Sjoblom

(No private emails please)
 
A spreadsheeI that allows me to enter hours is not adding up correctly
in the totals column. It adds up correct up to but not including 24
hours but after that the total deletes that 24 hoursl It seems Excel
is mistaking this for the 24 hours clock system and doesn't realize
that it must show the total. i.e., after deleting 3 rows above the
totals column I get a total of 23h16m but then after the next row, it
shows less than 1 hour with the final total of all the rows showing
01h31m. That should actually show 25h31m.

Is there a way to get Excel to actually add up the hours instead of
doing what it's doing?

oh, btw, the code is this for the totals cell:

=TIME(HOUR(SUM(K16:K41)),ROUND(MINUTE(SUM(K16:K41))/15,0)*15,0)

Thanks!

The [h]:mm cell formatting so that totals don't go over 24 hours works
but only when not rounding down.

With the rounding down code of
=TIME(HOUR(SUM(K16:K41)),ROUND(MINUTE(SUM(K16:K41))/15,0)*15,0)
rather than just
=SUM(K16:K41)
how can I get the [h]:mm cell formatting to work, anyone know?

Thanks once again in advance.
 
Wow! No need for that, if the values are time values you can just use

=ROUND(SUM(K16:K41)*96,0)/96

Looks like. I don't know where I get these things <g>. The above
seems to work just fine, too, so I switched. And now the cell
formatting change to [h]:mm (which for me and this spreadsheet ends up
being [h]"h"mm"m") works just superbly so far!

I have another 2 months of overtime to do in another sheet so that
will be the test.

Thanks everyone!!! :oD You're all life-savers once again.
 
A spreadsheeI that allows me to enter hours is not adding up correctly
in the totals column. It adds up correct up to but not including 24
hours but after that the total deletes that 24 hoursl It seems Excel
is mistaking this for the 24 hours clock system and doesn't realize
that it must show the total. i.e., after deleting 3 rows above the
totals column I get a total of 23h16m but then after the next row, it
shows less than 1 hour with the final total of all the rows showing
01h31m. That should actually show 25h31m.

Is there a way to get Excel to actually add up the hours instead of
doing what it's doing?

oh, btw, the code is this for the totals cell:

=TIME(HOUR(SUM(K16:K41)),ROUND(MINUTE(SUM(K16:K41))/15,0)*15,0)

Thanks!

The [h]:mm cell formatting so that totals don't go over 24 hours works
but only when not rounding down.

With the rounding down code of
=TIME(HOUR(SUM(K16:K41)),ROUND(MINUTE(SUM(K16:K41))/15,0)*15,0)
rather than just
=SUM(K16:K41)
how can I get the [h]:mm cell formatting to work, anyone know?

Thanks once again in advance.

Sorry, another response just came in. Changing the first round down
code to this simpler one:

=ROUND(SUM(K16:K41)*96,0)/96

fixed the problem, it seems. The new cell formatting now is obeyed
and I'm getting 25h30m. So the <24 hours is showing as well as
rounding down to 30m from 31m! Excellent.

Thanks! :oD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top