View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Subtracting Night-time-hours

http://www.cpearson.com/excel/DateTimeWS.htm
Working Days And Hours Between Two Dates And Times

--
Regards,
Tom Ogilvy

"Rob" wrote in message
...
I have a workbook that captures the hours that someone has spent reviewing
documentation (i.e. The time they received it and the time they returned
it),
and then it totals the hours. The problem I am having is that if they
happen
to not return the document until a few days later than I get an exorbitant
result when in actuality there is only 9 working hours a day and only five
days a week.

Here's what I'm looking at...

Col C Col D Col E
Row 439 08-29-06 9:10 AM 09-01-06 8:01 AM 70 hours 51 minutes ' Derrived
from this code -- =IF(D439<FALSE,D439-C439,"")

I need it to be this...

Col C Col D Col E
Row 439 08-29-06 9:10 AM 09-01-06 8:01 AM 25 hours 51 minutes ' by
subtracting 15 hours for each night


Does anyone know how I can mathimatically accomplish this by modifying
this
code so that it accounts for the evenings and weekends? --
=IF(D439<FALSE,D439-C439,"")


Thank You Sooo Much.
Rob