Try this macro ans see if it works the way you wish.
Option Explicit
Sub Solver_loop()
Dim i As Long
For i = 3 To 101
SolverReset
SolverOk SetCell:=Cells(22, i).Address, MaxMinVal:=2, ValueOf:="0", ByChange:=Range(Cells(17, i), Cells(19, i)).Address
SolverAdd CellRef:=Range(Cells(17, i), Cells(19, i)).Address, Relation:=3, FormulaText:="0"
SolverAdd CellRef:=Cells(20, i).Address, Relation:=2, FormulaText:="1"
SolverAdd CellRef:=Cells(22, i).Address, Relation:=2, FormulaText:=Cells(21, i).Address
SolverSolve Userfinish:=True
Next i
End Sub
Alf
Bookmarks