Hi Everybody I want help with the vba of the macro below, the idea is to loop through data and then paste the answers to a different part. It is an attempt to optimize fertilizer cost for various gps points as part of a precision Agrculture project , See outlay below:
'
' SOLVER1 Macro
'
'
SolverOk SetCell:="$H$6", MaxMinVal:=2, ValueOf:=0, ByChange:="$H$8:$H$22", _
Engine:=2, EngineDesc:="Simplex LP"
SolverAdd CellRef:="$B$4:$G$4", Relation:=3, FormulaText:="$B$3:$G$3"
SolverOk SetCell:="$H$6", MaxMinVal:=2, ValueOf:=0, ByChange:="$H$8:$H$22", _
Engine:=2, EngineDesc:="Simplex LP"
SolverOk SetCell:="$H$6", MaxMinVal:=2, ValueOf:=0, ByChange:="$H$8:$H$22", _
Engine:=2, EngineDesc:="Simplex LP"
SolverSolve
End Sub
If I run the solver( not cleaned) it returns the answer to H6( the minimized costs), and the amount or optimized fertilizer amounts to (H8:H22), I want to automatically select, the nutrient requirement(C25 : H25) then , run the solver and past the data alternatively to (L7 : Z7) ( OPTIMIZED COSTING) and the amounts of fertilizers to(L8:Z22) with each run...
Thanks for your time
dorkas
currently
'
' SOLVER1 Macro
'
'
SolverOk SetCell:="$H$6", MaxMinVal:=2, ValueOf:=0, ByChange:="$H$8:$H$22", _
Engine:=2, EngineDesc:="Simplex LP"
SolverAdd CellRef:="$B$4:$G$4", Relation:=3, FormulaText:="$B$3:$G$3"
SolverOk SetCell:="$H$6", MaxMinVal:=2, ValueOf:=0, ByChange:="$H$8:$H$22", _
Engine:=2, EngineDesc:="Simplex LP"
SolverOk SetCell:="$H$6", MaxMinVal:=2, ValueOf:=0, ByChange:="$H$8:$H$22", _
Engine:=2, EngineDesc:="Simplex LP"
SolverSolve
End Sub
If I run the solver( not cleaned) it returns the answer to H6( the minimized costs), and the amount or optimized fertilizer amounts to (H8:H22), I want to automatically select, the nutrient requirement(C25 : H25) then , run the solver and past the data alternatively to (L7 : Z7) ( OPTIMIZED COSTING) and the amounts of fertilizers to(L8:Z22) with each run...
Thanks for your time
dorkas
currently