LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Calculating diff between date/ time only between certain hours

See if this works for you:

A1: 2/19/2010 16:00
B1: 2/22/2010 9:00
C1: 08:00
D1: 17:00

E1:
=(NETWORKDAYS(A1,B1)-1)*(D1-C1)+IF(NETWORKDAYS(B1,B1),MEDIAN(MOD(B1,1),D1,C1), D1)-MEDIAN(NETWORKDAYS(A1,A1)*MOD(A1,1),D1,C1)

Format cell E1 to hh:mm


"GMv1" wrote:

Garreth Thanks but I need a formula that will only calculate the hours
between Monday and Friday between 8:00 and 17:00. The formula you provided
calculates for any hours.

"Garreth Lombard" wrote:

Hi there GMv1,

Assuming "2/19/2010 16:00" is in cell A1 and "2/22/2010 9:00" is in cell B1.
The formulae in cell C1 would be as follows :
=INT((B1-A1)*24)

Let us know if this helps you.
--

Thank you and Regards

Garreth Lombard


"GMv1" wrote:

I am trying to find the diff in hours only between 8:00 and 17:00 Monday to
Friday only, any hours that fall outside of that time frame should not be
counted. Each calculation will have different dates so if there is a way to
do this without specifying the date that would be great!

2/19/2010 16:00 2/22/2010 9:00 ???

Thanks for any assistance you can offer!



 
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
Calculating diff between date/ time only between certain hours GMv1 Excel Discussion (Misc queries) 5 March 2nd 10 05:26 AM
[NEWBIE] date/time diff Jon Excel Discussion (Misc queries) 4 June 26th 09 10:44 PM
difference of date/time only calculating workingdays/hours Susanne Excel Worksheet Functions 4 February 5th 09 01:42 PM
calculating time for late hours Tim Excel Worksheet Functions 1 May 28th 08 01:31 AM
calculating timesheet, time-in/time-out = total hours & minutes, . Steve Lindsay Excel Worksheet Functions 13 November 8th 06 03:45 PM


All times are GMT +1. The time now is 01:26 PM.

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

About Us

"It's about Microsoft Excel"