Perhaps something like this? But untested so it may not work. In this case an uploaded file is needed to fix code problem. This code is based on rows going from 2 to 150 modify as needed.
I assume you have set a reference to solver in VBA.
Option Explicit
Sub SolvLoop()
Dim i As Integer
For i = 2 To 150
SolverReset
SolverOk SetCell:="$AC$" & i, MaxMinVal:=1, ByChange:="$H$" & i & "," & "$J$" & i & "," & "$L$" & i, Engine:=2
SolverAdd CellRef:="$AD$" & i, Relation:=1, FormulaText:="3"
SolverAdd CellRef:="$H$" & i, Relation:=2, FormulaText:="=(1" & "-$J$" & i & "-$L$" & i & ")"
SolverAdd CellRef:="$J$" & i, Relation:=2, FormulaText:="=(1" & "-$H$" & i & "-$L$" & i & ")"
SolverAdd CellRef:="$L$" & i, Relation:=2, FormulaText:="=(1" & "-$H$" & i & "-$J$" & i & ")"
Next
End Sub
When posting you should wrap your code. Click on # icon and write your code in between "["Code"]" "[/"Code"]" symbols you see. (Forum rule!!!!)
Alf
Bookmarks