View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Add 4 hours (only if between 9am-5pm)

Angela,

For a date time in cell A2:

=A2+IF((A2-INT(A2)+4/24)*24 17,IF(WEEKDAY(A2,2)=5,2,0)+20/24,4/24)

HTH,
Bernie
MS Excel MVP


"Angela1979" wrote in message
ups.com...
Hi all,

I post a message earlier but it seems to have been removed.

Here goes again....

In column A I have a date and time.
I need a formula that will add 4 hours to the date and time, but take
into account working hours and weekends

Monday - Friday 9am - 5pm

Example
Column A
12/04/07 16:00

Column B
Formula for + 4 hours (taking into account Monday-Friday 9am - 5pm)

So the result in column B should be 12pm 13/04/07

Thanks Everyone