Welcome to the forum.
Try this:
Private Sub CommandButton1_Click()
Dim i As Long
Dim cell As Range
For Each cell In Range("L2", Cells(Rows.Count, "L").End(xlUp))
Application.StatusBar = "Solving " & cell.Address(False, False)
SolverReset
SolverOk SetCell:=cell.Address, _
MaxMinVal:=2, _
ByChange:=Rows(cell.Row).Range("M1:S1").Address
SolverAdd CellRef:=Rows(cell.Row).Range("T1").Address, _
Relation:=2, _
FormulaText:="1"
SolverSolve UserFinish:=True
Next cell
For Each cell In Range("V2", Cells(Rows.Count, "V").End(xlUp))
Application.StatusBar = "Solving " & cell.Address(False, False)
SolverReset
SolverOk SetCell:=cell.Address, _
MaxMinVal:=2, _
ByChange:=Rows(cell.Row).Range("W1:AC1").Address
SolverSolve UserFinish:=True
Next cell
Application.StatusBar = False
End Sub
Bookmarks