View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Work days difference between 2 dates.

This formula assumes an 8 hour working day, between 8:00AM and 5PM with an
hour break. But it also caters for days that start after 8:00AM and/or
finish before 5PM, and adds in those hours. I think this is one of my
concoctions, I certainly recall a similar one for an 8.5 hour day, but
looking at this, I think it may be wrong in not handling the break.

What exactly are your criteria?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Jeremy" wrote in message
...
Wow. That certainly did something. I am a true novice with excel. What
I
would like to know is how did this calculate the difference between times
if
the only cell I referenced was the date cell? I don;t really understand
what
the formula did, but I changed it to meet the cells of the sheet that I
have
and it certainly gave me numbers.

"ryguy7272" wrote:

I think this will help you:
=(NETWORKDAYS(A1,B1)-2)*8/24+((WEEKDAY(A1,2)<6)*(MAX(0,TIME(17,0,0)-MOD(A1,1))))-((WEEKDAY(A1,2)<6)*(MAX(0,TIME(8,0,0)-MOD(A1,1))))+((WEEKDAY(B1,2)<6)*(MAX(0,MOD(B1,1)-TIME(8,0,0))))-((WEEKDAY(B1,2)<6)*(MAX(0,MOD(B1,1)-TIME(17,0,0))))

I saw it on a post recently. The idea is quite brilliant; I certainly
didn't come up with the concept...

Anyway, hope it helps you out,
Ryan--



RyGuy


"Jeremy" wrote:

Please help me. I need to find the time elapsed for workdays only
between a
column of dates and times (available in one column or two) and a fixed
date
and time. I only need hours of a work day. I have gotten so far as to
get
the whole number of workdays elapsed, but I need more precise data than
that.


03373