ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Solver code does not save results to sheet - What am I missing?! (https://www.excelbanter.com/excel-programming/288187-solver-code-does-not-save-results-sheet-what-am-i-missing.html)

Simon Livings

Solver code does not save results to sheet - What am I missing?!
 
Dear all,

I am down to my last strand of hair on some code to run a Solver for my
spreadsheet. All I want is for the values to be kept on the sheet when
it is finished, but instead the change cells ("e11:i11") are left blank.
I have recorded the macro first, and then embellished it following
previous NG postings, yet it still doesn't work. The code is:

SolverReset
SolverOk SetCell:=Range("$J$31"), MaxMinVal:=3, Valueof:=0,
ByChange:=Range("$E$11:$I$11")
SolverAdd CellRef:=Range("$E$31:$I$31"), Relation:=2,
FormulaText:=0
SolverSolve (True)
SolverFinish KeepFinal:=1

I have searched the NG as much as possible to try and find why this
won't work. Any pointers for my errors would be gratefully received.


Many thanks in advance,
Simon Livings

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com