W
Wille
Hi All,
I think this guestion is quite easy but I can't find any path to solve
issue
. Idea is to use this function as excel normal functions e.g.
SUM().
My code looks like this:
********************************************************************************
Public Function Own_solver(Target As Range, Variable As Range)
If Abs(Target.Value) > 0.01 Then
Target.GoalSeek Goal:=0, ChangingCell:=Variable
End If
End Function
*********************************************************************************
Where "Targer" and "Variable" are variables which are given in excel
sheet. How I should change structure of my code to pass cell
addresses to code? At this moment only values are passed and function
fails.
Thanks in advance,
BR
I think this guestion is quite easy but I can't find any path to solve
issue
. Idea is to use this function as excel normal functions e.g.SUM().
My code looks like this:
********************************************************************************
Public Function Own_solver(Target As Range, Variable As Range)
If Abs(Target.Value) > 0.01 Then
Target.GoalSeek Goal:=0, ChangingCell:=Variable
End If
End Function
*********************************************************************************
Where "Targer" and "Variable" are variables which are given in excel
sheet. How I should change structure of my code to pass cell
addresses to code? At this moment only values are passed and function
fails.
Thanks in advance,
BR