Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
LU
 
Posts: n/a
Default get total hours from 2 dates

I need the total time from to dates.
My class starts on 6/10/2005 8:00
My class end on 6/11/2004 16:00

My excel spreadsheet has 6/10/2005 8:00 in one cell and 6/11/2004 16:00 in
another.

When I just do a date difference I get about 32 total hours which is wrong.
The total hours should be 16 hours since the class runs from 8:00 to 16:00
each day.
Help please
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

If your class days are always Monday through Friday you could use the
Networkdays function for this.(and the formula would be less complicated
than the one below!)

Here's something that will work:

A1 = 6/10/2005 8:00
B1 = 6/11/2004 16:00

=((INT(B1)-INT(A1))-1)*8/24+SUM(MIN(16/24,MOD(B1,1))-8/24,MAX(16/24,MOD(A1,1))-8/24)

Format the cell as [h]:mm

Biff

"LU" wrote in message
...
I need the total time from to dates.
My class starts on 6/10/2005 8:00
My class end on 6/11/2004 16:00

My excel spreadsheet has 6/10/2005 8:00 in one cell and 6/11/2004 16:00 in
another.

When I just do a date difference I get about 32 total hours which is
wrong.
The total hours should be 16 hours since the class runs from 8:00 to 16:00
each day.
Help please



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
scheduled hours total Jeff Desruisseaux Excel Discussion (Misc queries) 1 July 1st 05 11:38 AM
how do I total hours and mins in excel big_weegie Excel Worksheet Functions 0 June 16th 05 10:52 PM
Calculating Overtime from Hours total Dreamweavn via OfficeKB.com Excel Worksheet Functions 6 April 29th 05 11:21 PM
Problems calculating total hours LolaK Excel Discussion (Misc queries) 1 December 14th 04 04:23 PM
Subtracting paid hours from unpaid hours ejerry7 Excel Worksheet Functions 5 November 29th 04 04:16 AM


All times are GMT +1. The time now is 08:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"