ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA function returning the value EMPTY (https://www.excelbanter.com/excel-programming/283423-vba-function-returning-value-empty.html)

Helge V. Larsen[_2_]

VBA function returning the value EMPTY
 
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.



Jan Karel Pieterse

VBA function returning the value EMPTY
 
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



All times are GMT +1. The time now is 01:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com