LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 138
Default Calculating time increments from dates during working hours

Hello all,

I was trying to reply to an older topic that I never got back to which
has since been shut, but I thought that this formula might be useful
for someone searching the archives.

This is in response to a person looking to calculate the amount of time
elapsed, during working hours, between dates. Specifically for
calculating the length of time to get back to a customer during regular
business days with a start and end date and time.Unfortunately it does
not account for weekends yet, but maybe if I need that I'll build it
into it later.

Starting date = B3
Ending date = F3
Beginning of regular work day (ie. 08:00) = Y2
Ending of regular work day (ie. 16:00) = Y3
Same day calculation = K3

I have a column (K) to tell whether or not the dates are within the
same day - if they are, display "Yes". Formula in K3 =

=IF(((F3-B3)*24)<=(($Y$3-$Y$2)*24),"Yes","")

Now the formula for calculating the working hours (as specified in
cells Y3 and Y2) between dates is:

=IF($K3="Yes",($F3-$B3),((ROUNDDOWN($B3,0)+$Y$3)-$B3)+((ROUNDDOWN($F3,0)-(ROUNDDOWN($B3,0)))-1)+(($F3-(ROUNDDOWN($F3,0)+$Y$2))))

This gives you a decimal figure for days. Leave as is for days, or
multiply by 24 for hours, or 1440 for minutes.

Hope it can help someone.

 
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 times (hours and miniutes) on a time sheet madtech Excel Worksheet Functions 2 June 30th 06 07:40 PM
Calculating time Teri New Users to Excel 3 May 15th 06 05:50 PM
Problem with calculating time Lee Excel Discussion (Misc queries) 9 March 14th 06 08:53 PM
Working with dates and time Ben Excel Discussion (Misc queries) 4 March 7th 06 10:00 PM
Calculating working hours Mohammed Zenuwah Excel Discussion (Misc queries) 5 June 29th 05 10:52 AM


All times are GMT +1. The time now is 01:30 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"