Can you make Excel formula's iterate and count loops
<p>I'm almost certain the answer is 'no', but I thought I'd ask the people here just in case there is some magic formula I haven't yet found...</p>

<p>So lets say I have a table of values;</p>

<p>I've also got another cell somewhere (lets just say that this cell is A1 for my example), which has another number in it.  This number is actually a percentage (lets call it 20% in this example)</p>

<p>So I have a table that looks like this</p>

<pre><code>      A     B     C     D     E
1 |  20
2 |
3 | Number
4 |  23
5 |  68
6 | 145
7 |   8
</code></pre>

<p>The simplest way to explain it is to say I'm going to reduce each number by the percentage given in cell A1 (20% in my example).  I'm then going to repeat (so reduce the new values by another 20%) until the answer is zero (rounded to 2dp in this example, though I may need more or less rounding later).
I'm trying to work out how many times the formula must run to get the values to 0</p>

<p>Like I said, I'm almost certain this cannot be done outside of scripting (VBA etc.), since to my knowledge excel formulas can't loop and count??</p>

<p>I'm also sure that this is actually quite an easy script (though I don't know VBA at all, so it wouldn't so easy for me to do).  I'm certain I could do this in other languages.  But then that won't really help, as I'm trying to do this entirely in excel.</p>

<p>I've done it very inelegantly using a formula on another sheet copied down (A1 takes the percentage off the original value, A2 takes the percentage from the value of A1 etc.), and I can then just see which row number the value hits 0, but I was just curious to know if there was a more efficient solution;
a) without using VBA
b) using VBA to do so properly (not important, but I'd like to see how its done if anyone can)</p>

<p>Thanks</p>