Can I use a VBA function I write myself in a formula?

D

David Laub

Can I use a VBA function I write myself in a formula? It appears to be
impossibe...



Thanks

David Laub (e-mail address removed)
 
D

David Laub

When I try this, I get a "Invalid Name' error in Excel - i can use built in
function and named cells fine

Is there some sort of subtle scoping/fully qualified name" issue
 
F

Frank Kabel

Hi
where did you put this code?. It has to go in a standard module (see
the link I provided to you)
 
D

David Laub

Thanks again - I originally placed it in Sheet1 object instead of a New
Module

P.S. I read your note for listing User Defined Functions, but I don't know
how to "see" the Function Wizard list - can you help me even more?

Thanks
 
D

David Laub

Here's a bonus question: Thanks to your tip, I can invoke a User Defined
Function to populate a cell!
What I'd really love to do additionally is invoke a User Defined function as
part of formula based custom Data Validation - when I try this on a UDF that
works great as a formula cell value, I get a "can't find named range"
error - i.e. the Data Validation dialog is not understanding that the name
of my function is a user defined function - I can enter built-in function
names, or named cells, but (so far) I can't enter a user defined function

Thanks again
 
N

Norman Jones

Hi Frank,

I believe, however, that you can use a data validation formula that refers
to a cell that uses the UDF.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top