View Single Post
  #3  
Old January 19th, 2006, 11:15 AM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Can this even be done? Tracking Date / Time Elapsed

Hi

Set up a list of holiday dates somewhere on your sheet and use
InsertNameDefine Holidays Refers to your range of cells.

Then
=(TIME(17,0,0)-MOD(A1,1))+(MOD(B1,1)-TIME(8,0,0))+(NETWORKDAYS(A1,B1,holidays)-2)*9

Starting from the end of the formula, Networkdays returns the total
elapsed working days between the start and end dates, excluding any days
within the range of dates defined by holidays. Since we are dealing with
the start date and end date in the earlier part of the formula, then you
need to deduct 2 from the result, and multiply the result by 9 to cover
the hours for each full day elapsed.

The first part of the formula, uses MOD() to extract the time from the
day date value in the cell, and deducts this from 5 pm to calculate
elapsed hours on start day. The middle part does the same, but takes 8
am away from the time value to calculate elapsed hours on the final day.

--
Regards

Roger Govier


"scd" wrote in message
news
I'm trying to create a worksheet which records elapsed time between
Date /
Time Received and Date / Time Delivered. So far, so good. Problem
is, the
elapsed time I get really needs to use some form of Networkdays,
excluding
Holidays, and (here's the really tricky part) non-work hours. I've
tried
fiddling with various Ifs, but am not experienced enough at Excel to
grasp
why my formulas don't work.

What I currently have is giving me total time elapsed, which is good:

Received (A1) - 12/30/05 16:08
Delivered (B1) - 1/3/06 9:20
Elapsed (C1) - =(A1-B1) 3:17:12 (formatted Custom - d:h:mm)

The result I actually want in this example is 0:2:12, based on 52
elapsed
minutes on 12/30/05 and 1:20 on 1/3/06 (clock stops between 5PM &
8AM),
excluding weekends, holiday (1/2/03) & overnight hours (17:00-08:00).
Is
there any *possible* way to get there from here?

Any help greatly appreciated, but as I said, I'm not all that Excel
savvy,
so type... real... slow...