Problem with date formula

  • Thread starter Thread starter ADE2
  • Start date Start date
A

ADE2

Hi

I have the follwing date formula,it is meant to give today's date if i
is a workday and before 10 PM,after 10 PM the date is meant to rol
forward to the next workdays date.


=IF(HOUR(NOW())<22,WORKDAY(TODAY(),IF(OR(WEEKDAY(TODAY())=1,WEEKDAY(TODAY())=7),1,0)),WORKDAY(TODAY(),1))

This formula was working for most of the week but now it is showin
Thursdays date when it should be showing Fridays.My pc clock is showin
the right time.


Can anybody spot any errors in it


Thanks for the help

Ad
 
Hi Ade,

Try,

=IF((HOUR(NOW())<22)*(WEEKDAY(TODAY(),2)<6),TODAY(),WORKDAY(TODAY(),1))

Hope this helps!
 
Hi

I have the follwing date formula,it is meant to give today's date if it
is a workday and before 10 PM,after 10 PM the date is meant to roll
forward to the next workdays date.


=IF(HOUR(NOW())<22,WORKDAY(TODAY(),IF(OR(WEEKDAY(TODAY())=1,WEEKDAY(TODAY())=7),1,0)),WORKDAY(TODAY(),1))

This formula was working for most of the week but now it is showing
Thursdays date when it should be showing Fridays.My pc clock is showing
the right time.


Can anybody spot any errors in it


Thanks for the help

Ade

Rather than looking closely at your formula, would not:

=WORKDAY(NOW()+TIME(2,,)-1,1,holidays)

also do what you want?


--ron
 
Ade,

I tried it, and I couldn't get any combination to fail. It all worked great.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top