Time Formulas

A

ADE2

Hi,hope you can help


I have today's date displayed in cell U3 using the =TODAY() formula.
In cell AD2 i would like the cell to show today's date up to 10:00p
and after 10:00pm to show the next workday using the formul
=WORKDAY(U3,1)

Thanks for your hel
 
N

Norman Harker

Hi ADE2

Try:
=IF(TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW()))<--"22:00:00",TODAY(),WORKDAY(TODAY(),1))

I've made it independent of U3. the -- before "22:00:00" coerces the
string text to the time serial number for that time string.
 
D

DNF Karran

The today() function will not return the time, only the date. You wil
need to use the =NOW() function to get a date/time value. you can the
use this in the following:

=IF(HOUR(A1)>9,A1+1,A1)

Dunca
 
N

Norman Harker

Hi xld!

Re: "Why so complex Norman?"

Friday evening at +3 VB O'clock is the most obvious reason but I tried
to make it flexible for changes in the time parameter.
 
Top