VBA function returning the value EMPTY

  • Thread starter Thread starter Helge V. Larsen
  • Start date Start date
H

Helge V. Larsen

Is it possible to make a userdefined worksheet function return the value
Empty ?

What I need is a VBA function like :

Function Func_Empty(ByVal X As Variant) As Variant
If IsError(X) Then
Func_Empty = SomeThing
Else
Func_Empty = X
EndIf
End Function

SomeThing should not be 0 (zero), "" (empty string), or #N/A. I should
function as if I had manually deleted the value in the cell in question.
 
Hi Helge,
Is it possible to make a userdefined worksheet function return the value
Empty ?

No. A used defined function allways returns something.

You could set the result to an empty string:

Func_Empty=""

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com
 
Back
Top