Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Rates Simulator or Equivalent Function Needed

Status
Not open for further replies.

zan2006

IS-IT--Management
Oct 15, 2006
6
GB
Hi,

I am looking for either an existing Excel utility out there for providing a rate every few seconds to an Excel cell, or indeed a way to make an Excel cell appear with a different rate every say 3 seconds if I have a column of following rates that one completed the last one repeats the process again and again:

Rates
1.8801
1.8802
1.8803
...
...

Aby help would be greatly appreciated.

 


Hi,

Let's NAME your range of rates RateLisr
Define an index to point to a row in your RateList
Every 3 seconds, incriment your index by 1 until it exceeds the Range("RateList").Count
use the Timer function
use DoEvents to allow Workbook to be used.
Code:
    d = 3
    t = Timer
    i = 1
    Do
      If t + d < Timer Then
         [A1] = Range("RateList")(i)
         i = i + 1
         If i > Range("RateList").Count Then i = 1
         t = Timer
      End If
      DoEvents
    Loop

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top