Cell Formula to run VBA code
"David Byrne" wrote...
"Frank Kabel" wrote...
....
Now you can use
=IF(D5="", "", FOO())
Or perhaps even simpler
=FOO(D5,...)
Possibly too simple. Wrapping FOO() inside IF() ensures that FOO() would
only be run if the IF condition were False. If you make the condition the
first argument to FOO(), you require additional logic in FOO() to check its
first argument as well as reducing the usable arguments by one. Since the
Excel/VBA udf interface is quite slow, it's best to avoid calling udfs
unless necessary. Therefore, your proposed usage is inferior to Frank's as a
general design approach.
|