iterate calculations / solving

L

L3kter

I was trying to circumvent problems with solver, but I still can't fin
what I want (although it sounds easy).

I have a sheet with an input parameter cell that can vary between 0 an
100 (integer, steps of 1), a lot of intermediate calculations and on
cell for the solution.

I would like a new sheet with 2 columns, one for all input paramete
values (from 0 to 100) and one for each of these 101 according solutio
values.

How can I get Excel to calculate these values without having to ente
all 101 input parameters manually?

Thanks in advance..
 
J

jeff

Hi,

Try something like this macro:

Sub CalcIT()
Application.Calculation = xlCalculationManual
For j = 1 To 100
Range("Sheet1!A1:A1").Value = j
Application.Calculate
Worksheets("Sheet2").Range("A" & j & ":A" & j).Value
= j
Worksheets("Sheet2").Range("B" & j & ":B" & j).Value
= Range("Sheet1!B1:B1").Value
Next j
Application.Calculation = xlCalculationAutomatic
End Sub

jeff
 
Top