I have a few Simple Custom Functions that I use all the time. I have recently run into a spreadsheet that I desperately need to use them in, but when I try to use even the most basic custom functions, I get "#NAME?" with a hover text of "unknown function".
Even deleting all other code, and trying just this simple function, doesn't seem to work:
function double(d) {
return 2*d;
}
When I duplicate the spreadsheet, the code that comes with it DOES work.
A few Notes:
This is a Google Apps for Enterprise account.
I was originally not the owner on this spreadsheet, but have since become the owner, thinking that this might be the cause.
The spreadsheet originally had protected regions, which have since been removed, thinking that this might be the cause.
This spreadsheet is shared with hundreds of people, so I really want to find the root cause and fix it.
Any thoughts?
When you have custom functions on a sheet - they are
BOUNDto that sheet. So it does work when you duplicate thesheetitself , but it does not automatically become a global or domain wide custom function.The only way use it else where without actually publishing it as an add-on is to go to the tools menu, click on script editor and actually copy the code from the script bound to that sheet that it works with, then paste it in the script editor of the sheet you want to use it in.