Hi everyone,

I'm working with an assignment and i have come across following problem.

I need to run the following solver macro for the objective cell range P25:P78.

what I'm doing is, I enter a value to the G25 (actually values to the cell range G25:G78). Here G25=260.
I need to get the root of the equation entered in the objective cell(P25) and root will be displayed in the J25.
The following code is generated for P25. I need to get a code to repeat this process in the cell range P25:P78.

Sub Solve_n_repeat()
'
' Solve_n_repeat Macro
' Solve for R1 and repeat
'
' Keyboard Shortcut: Ctrl+r
'
    Range("G25").Select
    ActiveCell.FormulaR1C1 = "260"
    Range("P25").Select
    SolverOk SetCell:="$P$25", MaxMinVal:=3, ValueOf:=0, ByChange:="$J$25", Engine _
        :=1, EngineDesc:="GRG Nonlinear"
    SolverOk SetCell:="$P$25", MaxMinVal:=3, ValueOf:=0, ByChange:="$J$25", Engine _
        :=1, EngineDesc:="GRG Nonlinear"
    SolverSolve
End Sub
Please help me.
Thanx in advance!!