process a list through a cell

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

I am trying to reproduce / simpilify what the solver and
goal seak tools do.

I have one cell (input) that I want to recieve values from
a list. There is another cell (output) that I want to
write to a list.

I have a list of input values, an input cell, an output
cell and an empty output list.

Please help.
 
Tim,

You can use a macro: this works with Excel 2000 or up. Change the
"RangeNames" to reflect your sheet's range addresses or actual names.

Sub MakeList()
Dim myCell As Range

For Each MyCell In Range("InputList")
'Put each value into the input cell in turn
Range("InputCell").Value = MyCell.Value
'Do a calculation
Application.CalculateFull

'Record the output cell into the table
'Use this line if your input list is a column
MyCell.Offset(0,1).Value = Range("OutputCell").Value
'Use this line if your input list is a row
MyCell.Offset(1,0).Value = Range("OutputCell").Value
'Do the next value
Next myCell

End Sub
 
Back
Top