I’m trying to make this solver’s constraints repeat for over a hundred lines, I know nothing about coding, pls help, what am I doing wrong?
Sub MultipleSolver()
Dim i As Integer
ActiveWorkbook.ActiveSheet.Activate
For i = 6 TO 132
SolverReset
SolverOk SetCell:="$AJ$" & i, MaxMinVal:=2, ByChange: ="$AA$" & i
SolverAdd CellRef:-"$AJ$” & i, Relation:=1,
CellRef:="$AK$" & i
SolverAdd CellRef:-"$AA$" & i, Relation:=-4, FormulaText:-"integer"
SolverSolve True
Next i
End Sub