Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom functions not working in spreadsheet

I've followed the instructions from: https://developers.google.com/apps-script/execution_custom_functions to create a custom function.

Neither my functions or even cut and paste from the tutorial works: the functions aren't available to my spreadsheets. I've tried saving a version and publishing as a web app - with no change. I tried Google Chrome and Firefox, same result. Am I missing something really obvious here?

like image 523
Justin Tilson Avatar asked Aug 03 '12 21:08

Justin Tilson


People also ask

Why a custom function is not working in Excel?

As for the custom ones, Excel cannot validate the VBA code and identify other cells that could also affect the result of the custom function. Therefore, your custom formula may not change when you make changes to the workbook. To fix the issue, you'll just need to use the Application. Volatile statement.

Why are formulas not working on my Excel sheet?

The most common reason for an Excel formula not calculating is that you have inadvertently activated the Show Formulas mode in a worksheet. To get the formula to display the calculated result, just turn off the Show Formulas mode by doing one of the following: Pressing the Ctrl + ` shortcut, or.

How do you fix functions in Excel?

Make sure you copy and paste the formula and not the resulting value. Copy the cell contents and click the top-left area in the cell to get the paste options. Click Paste Values and Formula. You'll paste the formula instead of the value into the cell.


2 Answers

You need to have a comment with @customfunction in it above your custom function. Google Sheets will then add you custom function to the autocomplete menu.

like image 77
Scott S Avatar answered Sep 20 '22 01:09

Scott S


Not sure if this is what you ran into...but what happened to me is, I didn't see my custom function in auto-complete and I thought it's not working. But if you just type =double(A1) in a cell (using the official example, assuming there is something in A1...), it will compute!

like image 41
jtlai Avatar answered Sep 19 '22 01:09

jtlai