iteration and error "#div/0"

L

leon27

Who can help me to solve this problem.

I have made 2 files (calculations) in EXCEL in which I have used
iterations in some cells.
In the first file iterations are used in 3 cells, and this calculation
is being performed correctly.
Because the iteration does not start by itself when input values are
zero, I started out via a macro, putting a value larger than zero, in
the cell. Than I proceed by replacing this value with the formula
needed. I found out that this works okay.

But, now I've build a second file where in 24 cells there should be
performed an iteration. I also used a macro as described above for the
same reason. However, here the number of cells to start the iteration
is 24 instead of 3.
Running the macro leads to an #div/0 error;. But all cells, linked to
the cell that should iterated, are larger than zero.

Could it be that the memory get overloaded during the iteration
process? If this is the reason why the programme does not "calculates"
values, what can be done about this to make it work alright?

Or could it be that the iteration does not work well with automatic
calculation in EXCEL, is the one to fast for the other one, or
something like that.

Piece of the macro:
Range("D225").Select
ActiveCell.FormulaR1C1 = "=IF(R[85]C=0,0,R[-1]C*R[-9]C/R[85]C)"
'(Explanation: This formula is defined in D225, and gives a value.)
Range("D226").Select
ActiveCell.FormulaR1C1 = "=R[-1]C[]"
'(Explanation: D226 is given the same value as D225)
Range("D226").Select
ActiveCell.FormulaR1C1 = "=IF(R[85]C=0,0,R[-1]C*R[-9]C/R[85]C)"
''(Explanation: This now results in #DEEL/0!, in English EXCEL version
this is #DIV/0!)
'(The formula in D226 should result in an iteration, and give a
value).

I really would appreciate some help. All good suggestions are welcome.

Kind regards,
Leon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top