UDF listed twice

chihuahua

New Member
Joined
May 2, 2013
Messages
17
I have written a UDF and added it to an existing 'Add-in' module. The function works perfectly but when I type the '=' sign then the letters of the function, it is listed twice. Can anyone tell me why and how to remove one of them. Thanks.
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Tyron

Active Member
Joined
Dec 5, 2012
Messages
258
Hey Chihuahua,

do you mean that when you type the '=' sign it lists your function like 'function1function1' in the list of functions or does it list it like :
'function1'
'function1'

later

Ty

I have written a UDF and added it to an existing 'Add-in' module. The function works perfectly but when I type the '=' sign then the letters of the function, it is listed twice. Can anyone tell me why and how to remove one of them. Thanks.
 

chihuahua

New Member
Joined
May 2, 2013
Messages
17
Sorry. The function is listed as
Function1
Function1

Actual name is 'NthDayOfWeek' and it is listed twice in the UDF section of Insert Function Dialog Box as well
 

Tyron

Active Member
Joined
Dec 5, 2012
Messages
258
Sorry. The function is listed as
Function1
Function1

Actual name is 'NthDayOfWeek' and it is listed twice in the UDF section of Insert Function Dialog Box as well
This sounds like you may have duplicated it by accident. Either that or you may have declared it twice somewhere amongst your UDFs.

Go Developer --> Visual Basic. In the top right hand corner click on the arrow so it displays all your UDFs and see if it is listed in there twice. What version of Excel are you using?

later

Ty
 

chihuahua

New Member
Joined
May 2, 2013
Messages
17
I am using Excel 2010. The function is listed only once and I deleted it to see if one of them would go, but both of them did. Crazy huh ? Thanks for being interested.
 

chihuahua

New Member
Joined
May 2, 2013
Messages
17
Sorry Tyron. I went back and checked again and I did in fact have the same function listed in two different modules (in a different project as well). Thank you for your suggestion o I would never have rechecked it.. Thank you so very much-was driving me nuts !
 

Tyron

Active Member
Joined
Dec 5, 2012
Messages
258
I am using Excel 2010. The function is listed only once and I deleted it to see if one of them would go, but both of them did. Crazy huh ? Thanks for being interested.
Hey Chihuahua,

Yeah that is weird.

Below I have pasted in a webpage I went to for creating UDFs. It seems pretty thorough as it breaks down the steps. Maybe it can help you figure it out. As I am using 2013 I don't think I can be successful in duplicating your situation.

How do I write a simple User Defined Function (UDF) in Excel with VBA? – Computer Aided Finance - Excel, Matlab, Theta Suite etc.

Hope this helps. If not I am sure there will be someone on with 2010 a bit later.
later

Ty
 

Tyron

Active Member
Joined
Dec 5, 2012
Messages
258
Hey Chihuahua,

No problem. Glad I was able to help even though we use different versions.
Yeah, I know what you mean. One of my projects had me stumped also, but it was because I forgot to change a cell reference. And in a sheet with over 4 thousand formulas I was pulling my hair out. lol.

later

Ty
 

Forum statistics

Threads
1,089,278
Messages
5,407,347
Members
403,135
Latest member
becca_832313

This Week's Hot Topics

Top