UDF question
How would application.caller.text be implemented? Does it need a cell
reference?
my test looks like this
=IF(ISNUMBER(Q84),apcheck(),"")
Function apcheck()
If (CLng(Application.Caller.Text) 1) And (CLng(Application.Caller.Text) <
19) Then
apcheck = Application.RoundUp(Rnd() * 6, 0) + Application.RoundUp(Rnd() * 6,
0)
Else: apcheck = Application.Caller.Text
End If
End Function
it returns #NAME?
"Dave Peterson" wrote in message
...
Maybe you could use:
Application.Caller.Text
or
clng(Application.Caller.Text)
or
cdbl(Application.Caller.Text)
(.Text will return a string)
"Adam Kroger
is there a way to call the existing value of cell inside a UDF?
Cell A1 has a formula in it, including a UDF.
Inside that UDF's code, is there a way to retreive what the existing
value
of A1 is, before the UDF replaces that value with a new one.
intended purpose:
to prevent a volitile function from running every time Excel refreashes
its
calculations
nonexistant code example:
IF(ISNUMBER(CellValueFunction()),cell_value_functi on,rand())
Thanks
--
Dave Peterson
|