I had the same problem, and while the tutorial and Sum Ting Wong's answer actually do work, it didn't help in my case.
The sheet I was trying to use the custom function from was in the old format. So I converted it to the new format,created a custom function, and now I can use it the sheet.
Here's how you see if it's an old format sheet Check out the new Google Sheets
You can tell that a spreadsheet has been created in, or upgraded to, the new Google Sheets if it has a green checkmark at the bottom.
and here's how to convert it to the new format: Moving spreadsheets to the new Google Sheets
you can manually move spreadsheet contents into the new version of Sheets to take advantage of new functionality, following any of these steps:
- Copy and paste content from a spreadsheet created in the old version to a spreadsheet created in the new version.
- In a spreadsheet created in the old version, click the down arrow next to a sheet tab and click Copy to…, and copy the sheet (and its contents) to a spreadsheet created in the new version.
- Export the contents from the old version and import them into a spreadsheet created in the new version.