Excel Add-in #NAME error, it appends FUNCRES.XLAM'! in start of custom function names in formulas

Kashif Bashir Bhatti 36 Reputation points
2023-08-16T12:52:10.5333333+00:00

have an excel add-in containing custom functions built using JavaScript. Sometimes when user opens a sheet containing these custom functions, excel does not correctly show formulas. It appends "FUNCRES.XLAM'!xldudf" or "='C:\Program Files (x86)\Microsoft Office\root\Office16\LIBRARY\Analysis\FUNCRES.XLAM'!xldudf" in start of custom function, resulting in #NAME error. If I have a custom function named "Test", then all existing formula are shown as "=FUNCRES.XLAM'!_xldudf_Test" or sometimes as "='C:\Program Files (x86)\Microsoft Office\root\Office16\LIBRARY\Analysis\FUNCRES.XLAM'!_xldudf_Test".

Also if I add custom function to a new cell, it is recognized as correct formula and returns correct result. But if I save this sheet and re-open it then newly added formula is also shown as "#NAME" Error as described above.

Sometimes this error is resolved by restarting excel or computer, but I want to know the reason for this error and how to avoid this.

Microsoft 365 and Office Development Office JavaScript API
Microsoft 365 and Office Development Other
Microsoft 365 and Office Excel For business Windows
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.