Unfortunately (for me) this did not work and I see:Call Solver.SolverAdd(CellRef:=sumcell, Relation:=2, FormulaText:=1)
After much experimentation I used instead:
Call Solver.SolverAdd(CellRef:=sumcell, Relation:=2, FormulaText:=0.999999999999999)Now I see:
How in the world can such a bug be introduced? Some bugs make sense, but the logic of this one is difficult to fathom. I cannot but think there must be a statement somewhere:
if rhs=1 and (not interactive) and (user=’Erwin.Kalvelagen’) thenSolver works correctly with a =1 equation when used from the GUI.
call delete_constraint_to_confuse_user
Well, found some more reports on this strange bug:
- http://www.pcreview.co.uk/forums/problem-solveradd-can-anyone-help-t961905.html
- http://excelforum.com/excel-programming-vba-macros/492647-solved-missing-condition-after-solver-called-by-macro.html
- http://stackoverflow.com/questions/15620177/excel-solver-ignoring-constraint-in-vba