process a list through a cell

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.
 
B

Bernie Deitrick

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
 

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