ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to? UDF returning nothing (https://www.excelbanter.com/excel-programming/356447-how-udf-returning-nothing.html)

G Lykos

How to? UDF returning nothing
 
Greetings!

Have a function doing a conversion on a target cell. If the target cell is
empty (literally: IsEmpty), then I'd like for the function to return
nothing, such that the destination cell value is also empty (not a blank or
empty string, which is something).

No return (not setting a function value), and a return of Null, both result
in the number 0.

Ideas?

Thanks,
George



JE McGimpsey

How to? UDF returning nothing
 
Functions, whether built-in or UDFs, return values to cells.

Additionally, if there's a formula in the cell, it's not empty, and
won't be evaluated as empty by IsEmpty(), regardless of what it returns.

If you truly want the cell to be empty, you'll have to replace the
function with an event macro.

In article ,
"G Lykos" wrote:

Have a function doing a conversion on a target cell. If the target cell is
empty (literally: IsEmpty), then I'd like for the function to return
nothing, such that the destination cell value is also empty (not a blank or
empty string, which is something).

No return (not setting a function value), and a return of Null, both result
in the number 0.

Ideas?



All times are GMT +1. The time now is 05:13 AM.

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