Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to set the formula - 3 Dec?

Does anyone have any suggestions on how to set the formula?
If current time for today only is greater than 8 pm, then return 1 in cell
A1, else return 0.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default How to set the formula - 3 Dec?

=IF(HOUR(NOW()8,1,0)
or
=--(HOUR(NOW())8)

But be aware that the worksheet will need to recalculate for this formula to
change values as the time progresses
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Eric" wrote in message
...
Does anyone have any suggestions on how to set the formula?
If current time for today only is greater than 8 pm, then return 1 in cell
A1, else return 0.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How to set the formula - 3 Dec?

Hi Eric,

Try the following formula.

=IF(HOUR(NOW()-TODAY())=20,1,2)

Note that 20 is 8pm in military time.

Dan

Eric wrote:
Does anyone have any suggestions on how to set the formula?
If current time for today only is greater than 8 pm, then return 1 in cell
A1, else return 0.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default How to set the formula - 3 Dec?

An alternative with fewer functions:

= --(MOD(NOW(),1)=20/24)

However, note that both of them will only update when the sheet is
recalculated, not necessarily one second later than 19:59:59.

In article ,
Daniel Haley wrote:

Hi Eric,

Try the following formula.

=IF(HOUR(NOW()-TODAY())=20,1,2)

Note that 20 is 8pm in military time.

Dan

Eric wrote:
Does anyone have any suggestions on how to set the formula?
If current time for today only is greater than 8 pm, then return 1 in cell
A1, else return 0.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"