View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
L. Howard Kittle L. Howard Kittle is offline
external usenet poster
 
Posts: 698
Default Automate a Solver solution

Maybe something like this will get you started, where the value you want to
insert in the cells is in F1 and the 400 cells are D1:D400


Sub ForHunRow()
Dim i As Integer
Dim j As Range, c As Range

i = Range("F1").Value
Set j = Range("D1:D400")

For Each c In j
c.Value = i
Next

End Sub

HTH
Regards,
Howard

"Janet" wrote in message
...
I need to calculate a value to minimize a formula - I can do this with
Solver. The problem: I have 400 rows for which I have to use the Solver
calculation - and I need to update it occasionally.
I'm trying to figure out how to do this automatically instead of solving
each line manually. I suppose I could write a macro, but I don't know how
to
make the macro repeat itself until the last row and then stop. Any ideas?
Thanks.
--
Janet