User Defined function error?

Anonymous
2020-01-29T17:32:18+00:00

Hello,

We are getting the following message when opening on of our spread sheets.  "The following user-defined functions, created in an older version of Excel, have the same name as built-in Excel functions.  When these function names are used in a formula, the new built-in function will be used, which may cause different results.  Then it list a function named "Function" and one named "Sort".  I searched through the entire set of VBA project modules and there is no such functions defined in our file.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Andreas Killer 144K Reputation points Volunteer Moderator
    2020-02-01T10:17:46+00:00

    I think I've found the problem where Excel thinks that a UDF Sort is called (see text in bold):

    <v:textbox style='mso-direction-alt:auto' o:singleclick="f">

      <div style='text-align:center'><font face="Arial" size="200" color="auto">Sort Standards</font></div>

      </v:textbox>

      <x:ClientData ObjectType="Button">

        <x:Anchor>

          1, 7, 4, 24, 2, 34, 4, 45</x:Anchor>

          <x:PrintObject>False</x:PrintObject>

            <x:AutoFill>False</x:AutoFill>

    <x:FmlaMacro>[0]!_xludf.Sort</x:FmlaMacro>

                <x:TextHAlign>Center</x:TextHAlign>

                  <x:TextVAlign>Center</x:TextVAlign>

                  </x:ClientData>

    Please follow this steps:

    Make a backup copy of the file

    Open Excel

    File \ Open \ Browse \ Select the file \ Press the SHIFT key and hold it down \ Click Open

    Wait till the file is opened \ Release the SHIFT key

    Press Alt-F11 to open the VBA Editor

    Go into module PI_Stds and search for Sort (it's the second sub from the bottom)

    Rename Sub Sort() to Sub MySort()

    Close the VBA Editor

    Go into sheet "Standard Sheet Index"

    Right-click the "Sort Standards" button (within cell B5) and choose "Assign macro"

    Select "MySort" and click Ok

    Select cell A1

    Save the file

    Close and Reopen Excel

    Does this fix the issue?

    Andreas.

    2 people found this answer helpful.
    0 comments No comments

22 additional answers

Sort by: Most helpful
  1. Anonymous
    2020-01-29T18:38:43+00:00

    Hi Mike,

    This means there have a function named Sort in this worksheet, press Ctrl + F, the Find and Replace panel pop-up, input Sort in the Find what box, click Options and select Formulas from the drop-down list behind Look in. Click Find Next or Find All, can you find the Sort function now?

    You may select Workbook in the drop-down list behind Within to enlarge the search range.

    Best Regards,

    Hugo

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2020-01-29T20:01:50+00:00

    Yes, I did try that and there are no "Sort" or "Function" functions/formulas defined and any cell or formula.

    1 person found this answer helpful.
    0 comments No comments
  3. Lz._ 38,106 Reputation points Volunteer Moderator
    2020-01-29T20:17:21+00:00

    Hi Mike

    If you're 200% you have no VBA Sort function anywhere in your workbook and even if none of your worksheet use a Sort function (according to your last reply) I suspect you have an Excel add-in installed that "offers" a Sort function. Makes sense?

    Could you check that and post back please?

    0 comments No comments
  4. Lz._ 38,106 Reputation points Volunteer Moderator
    2020-01-30T09:39:18+00:00

    Hi Mike

    Something else that came into my mind. Although I have no idea at all if Excel would be able to detect that…

    If somewhere in your VBA project you leverage external library functions and one of them is named 'Sort'...

    Alt+F11 > Tools > References...:

    Your feedback is important for others who could face the issue… Thanks in advance

    0 comments No comments