Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to loop through rows of data and I'm having
trouble with the cell addresses. Microsoft's Solver discussion only utilizes specific cell addresses and I'm trying to change the target cell and constraint cells on a row-by-row basis. CLearly I'm not addressing the cells correctly by I'm not sure how to do it. Any help is greatly appreciated. Thanks! Here's the code: Dim i As Integer ' Number of rows Dim j As Integer ' Start row i = Cells(11, 3) For j = 14 To i SolverOk SetCell:=Range("Cells(j, 14)"), MaxMinVal:=2, ByChange:=Range("Cells(j,7):Cells(j,9)") SolverAdd CellRef:=Range("Cells(j, 3)"), Relation:=1, FormulaText:="Cells(j, 11)" SolverAdd CellRef:=Range("Cells(j, 4)"), Relation:=1, FormulaText:="Cells(j, 12)" SolverAdd CellRef:=Range("Cells(j, 5)"), Relation:=1, FormulaText:="Cells(j, 13)" SolverSolve UserFinish:=True SolverFinish KeepFinal:=1 Next j |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Will Solver do the job? | Excel Discussion (Misc queries) | |||
need help in SOLVER !! | Excel Discussion (Misc queries) | |||
Interesting Solver problem (Solver encounters an error) | Excel Discussion (Misc queries) | |||
Resetting Solver Manually to Fix Solver Bug | Excel Programming | |||
Solver | Excel Programming |