Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following VBA code runs Solver for one column (E) in a spreadsheet. I need to run it successivley for a series of columns. The row references do not change but the column references increment through F,G,H etc.
Can you show me how to program this? Thanks in advance. Sub DAL() ' ' DAL Macro ' Macro recorded 4/18/2011 by local.admin ' SolverOk SetCell:="$E$25", MaxMinVal:=3, ValueOf:="0", ByChange:= _ "$E$10,$E$14,$E$28,$E$29,$E$41" SolverAdd CellRef:="$E$37", Relation:=2, FormulaText:="0" SolverOk SetCell:="$E$25", MaxMinVal:=3, ValueOf:="0", ByChange:= _ "$E$10,$E$14,$E$28,$E$29,$E$41" SolverAdd CellRef:="$E$38", Relation:=2, FormulaText:="0" SolverOk SetCell:="$E$25", MaxMinVal:=3, ValueOf:="0", ByChange:= _ "$E$10,$E$14,$E$28,$E$29,$E$41" SolverAdd CellRef:="$E$47", Relation:=2, FormulaText:="0" SolverOk SetCell:="$E$48", MaxMinVal:=3, ValueOf:="0", ByChange:= _ "$E$10,$E$14,$E$28,$E$29,$E$41" SolverAdd CellRef:="$E$48", Relation:=2, FormulaText:="0" SolverOk SetCell:="$E$48", MaxMinVal:=3, ValueOf:="0", ByChange:= _ "$E$10,$E$14,$E$28,$E$29,$E$41" SolverSolve End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Having Solver Call a macro for each iteration | Excel Discussion (Misc queries) | |||
I want to use the solver in a macro. Can this be done? | Excel Programming | |||
How do I use Excel Solver (for an Iteration in a row) for several no.of times? | Excel Discussion (Misc queries) | |||
Running a Macro at every Solver Iteration | Excel Programming | |||
solver in macro | Excel Programming |