pawanhsharma
Board Regular
- Joined
- Feb 12, 2013
- Messages
- 64
Hello Everyone,
I am working on a financial file where I want to update a table by doing Goal Seek by changing a cell value. I am using below VBA Code. The code running fine and updating the table properly, also debug.print also showing correct result. however the cell which is suppose to change is showing incorrect value.
my code is
Sub Goal_Seek()
Dim Rrow As Range
With ThisWorkbook.Sheets("Calculation Model")
Set Rrow = .Range("G36:G101").Find(What:=Range("C12").Value, LookIn:=xlValues)
End With
'Do Goal Seek for obtaining
'Debug.Print Rrow.Row
'Debug.Print Range("L" & Rrow.Row).Value
Range("L" & Rrow.Row).GoalSeek Goal:=0, ChangingCell:=Range("C6")
End Sub
I want to update cell C6 value to update desired referance value to 0 (Zero)
I am working on a financial file where I want to update a table by doing Goal Seek by changing a cell value. I am using below VBA Code. The code running fine and updating the table properly, also debug.print also showing correct result. however the cell which is suppose to change is showing incorrect value.
my code is
Sub Goal_Seek()
Dim Rrow As Range
With ThisWorkbook.Sheets("Calculation Model")
Set Rrow = .Range("G36:G101").Find(What:=Range("C12").Value, LookIn:=xlValues)
End With
'Do Goal Seek for obtaining
'Debug.Print Rrow.Row
'Debug.Print Range("L" & Rrow.Row).Value
Range("L" & Rrow.Row).GoalSeek Goal:=0, ChangingCell:=Range("C6")
End Sub
I want to update cell C6 value to update desired referance value to 0 (Zero)