Perhaps a macro like this then?

Option Explicit

Sub SolvLoop()
Dim i As Long

For i = 2 To Range("AJ" & Rows.Count).End(xlUp).Row

SolverReset

SolverOk SetCell:="$AJ$" & i, MaxMinVal:=2, ValueOf:=5, ByChange:="$AJ$" & i, Engine:=1
SolverAdd CellRef:="$AJ$" & i, Relation:=1, FormulaText:="$AE$" & i
SolverAdd CellRef:="$AJ$" & i, Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$AP$" & i, Relation:=3, FormulaText:="5"
SolverSolve Userfinish:=True

Next

End Sub
As you have constraints in your solver setup but not in the recorded macro I'm a bit unsure if they should be included or not. In this macro these constraints are included.

In the future don't forget to wrap you code when posting.

Alf