none
Workbook name conflicts with a user defined function with the same name RRS feed

  • Question

  • Let's say you have a UDF called Categories2. If you now define a Workbook name Categories2 then the UDF stops working and starts returning #REF errors. It seems that there is a conflict in the names.

    Here is a gif that shows this problem:
    http://pasteboard.co/1iVFd1aE.gif

    I guess Excel does not know it should call the UDF in this case? Is there a workaround? Our customers have various names in their workbooks and we would like to find a way that would work in all situations no matter what existing names are in the workbook. 

    I guess we should use some strange names for our UDFs in hopes that they will really stay unique and that our users are not using them, but maybe there is a better way?



    Thursday, February 4, 2016 2:45 PM

Answers

  • You could prefix UDF names with for example fnc. It's unlikely that the user will create a defined name fncCategories2.

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Thursday, February 4, 2016 3:59 PM

All replies

  • You could prefix UDF names with for example fnc. It's unlikely that the user will create a defined name fncCategories2.

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Thursday, February 4, 2016 3:59 PM
  • Yeah, we are doing something like that for the names that we define, I guess we should start doing it for our UDFs as well.
    Thursday, February 4, 2016 6:45 PM
  • Hi, Mitja Bezenšek

    According to your description, I have reproduced this issue, thanks for your sharing this issue, that will help other community member when they have same issue.

    Friday, February 5, 2016 6:30 AM