User-defined function not recognized in formula
And you created a regular/normal/general module and put the code in that module?
What's the name of the function?
What's the name of the module?
Can you use the function in a simpler formula?
What did that formula look like?
Did you enable macros to run when you opened the workbook? But that would cause
a Name error--not a Value error?
Maybe it's working fine and your input isn't correct????
======
If the function is in a different workbook, you would need to use something
like:
='otherworkbookname.xls'!myFunc(a1)
If the function is in a different workbook that's been saved as an addin, then
you don't need to qualify it.
=myfunc(a1)
would work ok.
=============
The uppercase/lowercase isn't the problem. Excel seems to use the case of
whatever you chose to type the first time you used it in the first formula.
Hershmab wrote:
Excel 2003, XP SP3:
I have written VBA code to define a private Boolean function for my current
workbook and inserted it in a new module belonging to that workbook. VBE
clearly recognizes it and does not flag any errors.
But when I reference the function in a formula (spelled correctly with
upper-case letters where appropriate) the spelling gets altered and the cell
shows #VALUE! When I try to debug the code, there is no evidence that it has
been entered at all.
I have previously tried creating the function under a different name and
placed it in other modules in other workbooks (in my XLSTART folder), but I
had no more success. In some of the tests, the cell value showed as #NAME?
instead.
What am I doing or not doing?
--
Dave Peterson
|