View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Set of varibles produces one output. Need series of output.

Aaron,

Yes, it is possible. You could use a macro to change the values in a cell or multiple cells, then
calculate your model, and record the results of any calculation as a value in a table. You would
need to better define your problem, but it could be as simple as the macro below, which varies the
values in cells A1 and B1, then records the output of cell H2, creating a table that starts in
A6:C6.

Sub TryNow()
Dim i As Integer
Dim j As Integer
Dim myRow As Long

Range("A6").Value = "I Value"
Range("B6").Value = "J Value"
Range("C6").Value = "Calc'd Value"
Range("A7:C65536").Clear

For i = 1 To 10
For j = 1 To 10
Range("A1").Value = i
Range("B1").Value = j
Application.CalculateFull
myRow = Range("A65536").End(xlUp)(2).Row
Cells(myRow, 1).Value = i
Cells(myRow, 2).Value = j
Cells(myRow, 3).Value = Range("H2").Value
Next j
Next i

End Sub

HTH,
Bernie
MS Excel MVP


"Aaron" wrote in message
...
I have what seems to me to be a large and complex multiple sheet wookbook
that uses & produces multiple sets of calculated tables all to produce one
final set of data and one key number all based on a set of about 20 input
variables. Is it possibe to produce a series of results in the key number
based on set of values for one particular variable instantly without having
to enter the series of variables and manually record the result of the key
data? 'Cause if it is that would like totally rock! Seriously it would be
great and I would appreciate the help.

Or with 2 or 3 variables.