Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / May 2008

Tip: Looking for answers? Try searching our database.

get HOUR check from NOW() cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nastech - 27 May 2008 06:18 GMT
hi, not good with date, times, cannot get out of help, want to test for cell
is x hours past cell that has been updated with NOW().

e.g.:
cell M9 with NOW():  2008-05-27  2:00:00 AM

=IF(current time is 2 hours>M9,0,1)

would suggest help file have example how to manipulate NOW().
trying:  =TRIM(LEFT(M9,SEARCH("  ",M9,12)))    
gets a value error/ might make to big a formula.

would think easier way to manipulate this data.  thanks
Nastech - 27 May 2008 07:28 GMT
after some effort, came up with:  (is there a shorter/ simpler way)

=IF((HOUR(TRIM(RIGHT(M9,11)))+1)>HOUR(NOW()),1,0)

> hi, not good with date, times, cannot get out of help, want to test for cell
> is x hours past cell that has been updated with NOW().
[quoted text clipped - 9 lines]
>
> would think easier way to manipulate this data.  thanks
Nastech - 27 May 2008 07:57 GMT
but last example seems can be off by 59 minutes, (is 1 from 1:00 to 1:59?)

> after some effort, came up with:  (is there a shorter/ simpler way)
>
[quoted text clipped - 13 lines]
> >
> > would think easier way to manipulate this data.  thanks
Nastech - 27 May 2008 08:10 GMT
example need to work getting longer..  must be a shorter way:
IF(OR(IF(M9>0,(HOUR(TRIM(RIGHT(M9,11)))+$C$6)<HOUR(NOW()),TRUE)),0,1)

still off by 59 mins..

> but last example seems can be off by 59 minutes, (is 1 from 1:00 to 1:59?)
>
[quoted text clipped - 15 lines]
> > >
> > > would think easier way to manipulate this data.  thanks
Rick Rothstein (MVP - VB) - 27 May 2008 08:14 GMT
Give this formula a try...

=IF(24*(NOW()-M9)>2,1,0)

Rick

> example need to work getting longer..  must be a shorter way:
> IF(OR(IF(M9>0,(HOUR(TRIM(RIGHT(M9,11)))+$C$6)<HOUR(NOW()),TRUE)),0,1)
[quoted text clipped - 22 lines]
>> > >
>> > > would think easier way to manipulate this data.  thanks
Nastech - 27 May 2008 09:21 GMT
thanks!  works great for minutes away.  only difference is that am using 0 as
null/false condition..  or    =IF(24*(NOW()-M9)>2,0,1)

in example if date present in m9
=IF(OR(IF(M9>0,24*(NOW()-M9)>$M$6,TRUE)),0,1)

think tried to get this couple times, way back, never could get answer/
didn't know how to ask, was a major problem.  could not figure from now()
help.  not much there.  thanks again.

> Give this formula a try...
>
[quoted text clipped - 28 lines]
> >> > >
> >> > > would think easier way to manipulate this data.  thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.