Increment Count on Recalc

  • Thread starter Thread starter PaulT99
  • Start date Start date
P

PaulT99

How do I cause a count to increment when the spreadsheet recalculate
(F9)? Every time I recalc the count gets reset back to 0. I have trie
several of the count functions and none seem to do what I want.

I have multiple count fields and want one of my "Count" field to
increment each time the F9 key is pressed based on certain criteria.

Thanks,

Paul
 
Hi
you may use the worksheet_calculate event to incremebt a cell on your
file. though I'm not so sure what you're trying to achieve with this
procedure :-)
 
I am playing with probability.
I have 2 columns of random integers.
I'm counting how many times a number in column 1 matches a number i
column 2.
If there's 1 match the first time, the "Count = 1" cell would go from
to 1. If on the next recalculation there is also 1 match, then th
"Count = 1" cell should increment to 2.

Any help is appreciated.

Paul
 
I figured it out.

A two cell accumulator can be constructed without VBA using circula
references. To avoid an error, first choose Tools/Options/Calculatio
and check the Iterations checkbox. Enter 1 in the number of iteration
box. Now enter the following

B1: =SUM (A1 + B1)

Pretty simple
 
Paul

And if you make a mistake in your data entry.....??

Also, each time Excel re-calculates, the total will change.

Risky method.

Gord Dibben Excel MVP
 
Back
Top