Problem with date formula

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
 
D

Domenic

Hi Ade,

Try,

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

Hope this helps!
 
R

Ron Rosenfeld

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
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top