Help defining a user-defined function
One way:
Public Function MyExp( _
ByVal x As Double, _
ByVal Xa As Double, _
ByVal Ya As Double, _
ByVal Yb As Double, _
ByVal h As Double) As Double
MyExp = Yb + (Ya - Yb) * Exp(Log(2) / h * (x - Xa))
End Function
In article ,
LurfysMa wrote:
On Fri, 08 Jun 2007 21:14:57 -0700, LurfysMa
wrote:
In Excel 2000, I need to create a user-defined function to execute an
exponential formula with 4 parameters: Xa, Ya, Yb, & h.
The formula is:
y = Yb + (Ya-Yb) * exp( (ln(2)/h) * (X-Xa) )
I would like the function created so that I can use it justr like the
built-in functions such as power: =power(B5,E9).
I would like to invoke my function like this:
=MyExp(B5,C5,D5,F5)
Thanks for any help or pointers.
Correction, I left off the independent variable, "x".
The function has 5 parameters: x, Xa, Ya, Yb, & h:
=MyExp(B7,B5,C5,D5,F5)
--
|