Swarup Modak
New Member
In the attached file I have created a calculation.
The problem is that the calculation is being held very slowly within do while loop. I would like to use Goal Seek in place of do while loop. I have gone several sites to understand Goal Seek function.
In the macro I have written one goal seek function as follows:
I am facing two problems:
1. After goal seek program is reading value at cell CP6 and marking error though in excel I am getting zero value (zero value is expected).
2. I am also unable to replace further do while loop by goal seek for faster calculation.
Help is requested.
Any suggestion for faster calculation other than using goal seek is also welcome.
With Best Regards,
______________________________________________________________
The problem is that the calculation is being held very slowly within do while loop. I would like to use Goal Seek in place of do while loop. I have gone several sites to understand Goal Seek function.
In the macro I have written one goal seek function as follows:
Code:
' To Generate Residual Value in Special Allowance
If .Worksheets(lcCalcSheet).Range("$" + "CP" + "$" + CStr(lnLoopStartRow)).Value > 0 Then
.Worksheets(lcCalcSheet).Range("$" + "CP" + "$" + CStr(lnLoopStartRow)).GoalSeek _
Goal:=0, _
ChangingCell:=.Worksheets(lcCalcSheet).Range("$" + "AP" + "$" + CStr(lnLoopStartRow))
End If
I am facing two problems:
1. After goal seek program is reading value at cell CP6 and marking error though in excel I am getting zero value (zero value is expected).
2. I am also unable to replace further do while loop by goal seek for faster calculation.
Help is requested.
Any suggestion for faster calculation other than using goal seek is also welcome.
With Best Regards,
______________________________________________________________
Mod edit : thread moved to appropriate forum !