hit counter question

B

Bob Chapman

I need a hit counter on Excel 2003 which counts the number of times a
condition is met. This spreadsheet DDEs to RediPlus (trading software).
The DDE fields would be "last price" and "day high price". When last = day
high, I have it flash a green conditional format. What I would like to do
is to not only flash green but also count the number of times last = day
high. For example,

A1 = DDE link to "last price" of IBM (constantly changing)
B1 = DDE link to "day high price" of IBM (changes only when a new high is
made otherwise stays the same)

C1 = alert if they equal (IBM is making a new high) - flashes green via
condiitional format

I would like to put a hit counter in C1 that only increases when last = day
high

Seems simple, but I just can't get it to work

Thanks
Bob
 
C

Charley Kyd

Bob,

I *think* I know what you're after.

In general, I think you need to set up an iterative process. To start,
choose Tools, Options, Calculation. Check the Iteration checkbox and enter
32767 (the maximum value allowed) as the maximum number of iterations.

In cell C1 enter the formula:
=IF(A1>=B1,C1+1,C1)

Here, each time A1 is greater than or equal to B1, C1 adds 1 to its own
value. Yes, this formula has a circular reference. But Excel doesn't
complain because of the Iteration setting.

Hope this is what you want.

Charley Kyd
 
Top