View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
AG[_4_] AG[_4_] is offline
external usenet poster
 
Posts: 5
Default writing its own function

Dana DeLouis wrote:
Not sure, but if 'x' were -2, is this what you are trying to do?

Sub Demo()
Dim v
v = Sgn(-2) * [Erf(Abs(-2))]
End Sub

Note that in VBA, the "Sign" function is called "Sgn" (Worksheet, it is
'Sign')

HTH


Thanks Dana, using Sgn() instead of sign() works fine. But I still get a
#NOM? error.