Is ther anyway to combine the now and today fuctions in a logic formula?
Somehting like....
if it from 7am to 11:59pm then display today and if it between 12am and 7am
display yesterdays date
Any help would be greatly appreciated
Thank You
Gary''s Student - 17 May 2008 13:00 GMT
Put a time in A1 and in B1 enter:
=IF(A1>0.2916666666,TODAY(),TODAY()-1) and format as a date

Signature
Gary''s Student - gsnu200786
Pete_UK - 17 May 2008 13:09 GMT
Try this:
=IF(MOD(NOW(),1)>=7/24,TODAY(),TODAY()-1)
Hope this helps.
Pete
> Is ther anyway to combine the now and today fuctions in a logic formula?
> Somehting like....
[quoted text clipped - 4 lines]
>
> Thank You
THill - 17 May 2008 13:45 GMT
Thank you so much
> Try this:
>
[quoted text clipped - 12 lines]
> >
> > Thank You
Pete_UK - 17 May 2008 14:47 GMT
You're welcome.
Pete
> Thank you so much
T. Valko - 17 May 2008 17:42 GMT
Try this:
=TODAY()-(HOUR(NOW())<7)
Format as DATE

Signature
Biff
Microsoft Excel MVP
> Is ther anyway to combine the now and today fuctions in a logic formula?
> Somehting like....
[quoted text clipped - 5 lines]
>
> Thank You
Pete_UK - 17 May 2008 18:42 GMT
Neat one, Biff.
Pete
> Try this:
>
[quoted text clipped - 17 lines]
>
> - Show quoted text -
daddylonglegs - 17 May 2008 18:44 GMT
If it's just for display purposes
=NOW()-7/24
format as date
If you want the underlying value to be a date only, add an INT function, i.e.
=INT(NOW()-7/24)
> Try this:
>
[quoted text clipped - 11 lines]
> >
> > Thank You
T. Valko - 17 May 2008 20:48 GMT
Even better!

Signature
Biff
Microsoft Excel MVP
> If it's just for display purposes
>
[quoted text clipped - 23 lines]
>> >
>> > Thank You