Hi all

New VBA user here and first post on the site.

I have created and edited a simple macro (code below) which runs solver then copies and pastes the results/data from the affected cells in to the next available blank row in column E.

Currently the objective is set to minimise cell H33 by changing cells J33:P33 with a constraint that the figures in J33:P33 must sum to 1. What I would like to do is loop the macro for a specified number of iterations (e.g. 50) but I want to be able to set cell H33 to a specified value (e.g. 6), run solver, copy & paste as described then loop through but on each loop, the specified value in cell H33 increases incrementally (e.g. by 0.1) on each run.

Sub Test()
 '
 ' Test Macro
 '
 SolverReset
 SolverOk SetCell:="$H$33", MaxMinVal:=2, ValueOf:=0, ByChange:="$J$33:$P$33", _
 Engine:=1, EngineDesc:="GRG Nonlinear"
 SolverAdd CellRef:="$Q$33", Relation:=2, FormulaText:="1"
 SolverSolve True
 Range("E33:P33").Copy
 Sheets("Output").Range("E" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteAll
 End Sub
I hope that makes sense.

Any help much appreciated.