Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#NAME? in Excel when trying to implement a function

Status
Not open for further replies.

RedMoo

Technical User
Apr 27, 2005
22
IE
Hi All,
I have been trying to implement one of Chip Pearsons functions SumByColor that is created in VBA Editor.
I added the code into the VBA editor and then tried to call the function from Excel, It returns #NAME?.
Could anyone point me in the right direction with regards to adding a function to Excel using the VBA editor.

Cheers,
RedMoo
 
as long as it is spelled the same, there shouldn't be an issue. Only other thing I can think of is that the function must be in a STANDARD module and it must be PUBLIC

Rgds, Geoff

Three things are certain. Death, taxes and lost data. DPlank is to blame

Please read FAQ222-2244 before you ask a question
 
Where did you add the code to in the VBE? If you stuck it in your personal.xls then try preceding the function with the workbook name, eg:-

=PERSONAL.XLS!SumByCol(........)

Regards
Ken............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
I have made the function public and it is located within the workbook that I am currently working on. But still no joy.

Redmoo
 
what kind of module ? Normal, sheet or workbook ?

Rgds, Geoff

Three things are certain. Death, taxes and lost data. DPlank is to blame

Please read FAQ222-2244 before you ask a question
 
xlbo thank you......you just pointed me in the right direction I had never added it into a module and it appears to have done the trick.
I'm not the strongest on the VBA side of things so any hints help.

Cheers,
Redmoo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top