DO NOT USE THIS TAG ALONE. Unlike built in functions where the functions are designed by the product designers for mass use, Custom functions are functions that are custom designed for only a subset of end users. Use for questions relating to such functions along with the product in question(eg [sql], [google-sheets],[excel]).
Questions tagged [custom-function]
545 questions
11
votes
1 answer
Custom functions intermittently hang with "Error - Loading Data"
I have a Google Apps Script custom function, very simple:
function sharesBurned(sharesToSell) {
return "tree"
}
Obviously, this works when I test it in Apps Script. In my sheet, when I call it in a cell, sharesBurned(2), for instance, it…

doodeecheng5
- 141
- 5
10
votes
2 answers
Google Sheets filename in cell via formula instead of a script?
Is there a FORMULA that will display the name of the file in a cell?
I've found scripts that will do it, formulas that will display the sheet name, but no luck finding a formula that will show the filename.
If I have to resort to the script, so be…

TC76
- 860
- 1
- 8
- 17
10
votes
2 answers
To exceed the ImportXML limit on Google Spreadsheet
I am stucking on a "scraping problem" right now. Especially i want to extract the name of the author from a webpage to google spreadsheet. Actually the function =IMPORTXML(A2,"//span[@class='author vcard meta-item']") is working, but after i raise…

rookie4
- 111
- 1
- 1
- 4
10
votes
6 answers
How to evaluate a spreadsheet formula within a custom function?
In a spreadsheet I can enter =SIN(45)+123 in a cell, and it will be evaluated.
How can I evaluate spreadsheet functions within a custom function, something like an "eval"
function that would work like this :
function myFunc() {
return…

Max L.
- 9,774
- 15
- 56
- 86
10
votes
3 answers
How to add "custom function help" to a google spreadsheet. - not the script editor
It is possible to add "custom function help" to a google spreadsheet?
i.e. If I type =sum into a spreadsheet cell, I get floating help text,
is there a way to do this with custom functions?
Documentation in google apps script is created using JSDoc…

eddyparkinson
- 3,680
- 4
- 26
- 52
9
votes
2 answers
JSDoc for showing optional arguments in Google Sheets autocomplete dropdown
I'd like to document (in the Google Sheet autocomplete) a custom function with optional arguments, similar to the WEEKDAY function (autocomplete below).
The JSDoc spec on optional arguments does not work. Google does not seem to document this…

ehfeng
- 3,807
- 4
- 33
- 42
9
votes
1 answer
Custom function not recognized
I created anew function in sheets from within a sheet. The function is not recognized:
From within the sheet tools > script editor
function DOUBLE(input) {
return input * 2;
}
save
Go into the sheet, enter a cell and type =double(10)
Error…

Doug Fir
- 19,971
- 47
- 169
- 299
9
votes
4 answers
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…

Justin Tilson
- 833
- 1
- 10
- 12
8
votes
2 answers
Google Sheets custom function displays "Loading..." forever in mobile app
I have written a custom function for Google Sheets in Apps Script. The goal is to have a sheet which automatically calculates who owes how much money to whom (e.g. to split a bill).
My sheet looks like this:
The first bill (Restaurant) is to be…

Robert
- 432
- 1
- 4
- 15
7
votes
3 answers
What is the difference between array_udiff_assoc() and array_diff_uassoc()?
What is the difference between array_udiff_assoc() and array_diff_uassoc()?
For array_udiff_assoc(), I have this code:
function myfunction($v1,$v2)
{
if ($v1===$v2) {
return 0;
}
return 1;
}
$a1 = ["a" => "Cat", "b" => "Dog",…

php.khan
- 1,224
- 1
- 12
- 21
7
votes
2 answers
How to pass a dynamic column name in a pipe in custom function in R
I've created a dynamic column name w/ dplyr::mutate() based on this thread Use dynamic variable names in `dplyr` and now I want to sort the new column.... but I'm not correctly passing the column name
library(glue)
library(dplyr)
#…

seansteele
- 619
- 3
- 10
7
votes
2 answers
Google Spreadsheet custom function made of built in spreadsheet functions
I have following function in a cell. It reads date from other cell, than calculates age and transforms it in format "3 weeks 5 days"
=INT((TODAY()-D19)/7)&" weeks, "&(TODAY()-D19-(INT((TODAY()-D19)/7)*7))&" days"
It works.
Now I would like to…

tomazzlender
- 1,123
- 12
- 22
7
votes
2 answers
How to debug a spreadsheet custom function in google script?
I am writing a custom function to be used in a spreadsheet and I would like to be able to at least display some data. Few things seem to work, for example Browser.msgBox doesn't find the appropriate permissions.
Breakpoints don't interrupt…

WesR
- 1,292
- 1
- 18
- 30
6
votes
2 answers
How to parallelize execution of a custom function formula while keeping the Google Sheet shareable and permissionless?
I have a Google Sheet with a custom function formula that: takes in a matrix and two vectors from a spreadsheet, does some lengthy matrix-vector calculations (>30 sec, so above the quota), before outputting the result as a bunch of rows. It is…

Magne
- 16,401
- 10
- 68
- 88
6
votes
1 answer
How to fix the "Service invoked too many times for one day: urlfetch" error?
I am getting the following error in my Google sheet:
Service invoked too many times for one day: urlfetch
I know for a fact I am not making 100k calls, but I do have quite a few custom functions in my sheet. I tried to make a new sheet and…

kaitlynmm569
- 1,605
- 1
- 6
- 18