Archive of Mr Excel Message Board

Back to Forms in Excel VBA archive index
Back to archive home

Calculating Time
Posted by Mike Consolo on August 08, 2001 2:40 PM
To Whomever Can Help-
I am trying to calculate the sum of hours that someone might work. I have no problem calculating the hours per day. But when I try and add the total for each of those days together it does not show as 40 or 50, etc.
For example 8 hours on Monday, 8 hours on Tuesday. I would enter 8:00 through 16:00 for each of those days. It would calculate the hours for that day as 8:00(16:00 minus 8:00). However when I add the time for each of those days (8:00 plus 8:00) it does not return the correct value(16).
Can someone tell me how I can use calculations with time.
Thanks
Mike

Re: Calculating Time
Posted by Aladin Akyurek on August 08, 2001 2:42 PM
Custom format the cell where you do the summing as:
[h]:mm
Aladin
==========

Re: Calculating Time
Posted by Mark W. on August 08, 2001 2:44 PM
Format total as... [h]:mm

Wasted too much time spelling "Pythagorean" : )
Posted by Mark W. on August 08, 2001 2:50 PM

Mark and Aladin are correct of course...but in your example 8:00 + 8:00 does come out as 16 (well, 16:00)
Posted by Ian on August 08, 2001 3:34 PM

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.