WRITING A TIME SENSITIVE FUNCTION

  • Thread starter Thread starter rmf1
  • Start date Start date
R

rmf1

How can I write a formula to return a value based on a time of day,
and then retain it. E.g., if it is exatly 9AM, record Total volume on
the NY stock exchange, if its not exactly 9AM do nothing. I want to
compile a table during the day of NYSE volume. I need to write an
"IF" function similar to the following:

IF(it is 9AM, retrievevolume,donothing)

The part I cannot figure out is how to write the "do nothing" command.
 
Hi,

What about
=If(now()-today()=0.375,retrievevolume,)
I have not mentioned anything in the false condition so the cell will be
blank in case its not 9AM.
In case u want the cell to "retain" the value then you will have to do this
through VB.
0.375 is basically 9 divided by 24.

Regards,
Hari
India
 
Hi,

Sorry. If not mentioned anything for False condition Excel is giving a zero.
May be it could be modified as
=If(now()-today()=0.375,retrievevolume,"")

Regards,
Hari
India
 
Hari,

The "" will make the cell blank at any time the condition does not
exist. What I am trying to do is capture a number at a specific time
and have it retained in the cell. Over the course of the trading day,
I want to analyze volume on the stock exchange as it occurs.
Effectively, I want to build a table real time.

Thanks
 
Hi,

It seems u want to retain the old value in the cell if time is not 0900 AM.

Only value I can think of it is using VB. (Circular reference is not
possible).

Regards,
Hari
India
 
Back
Top