Questions tagged [google-sheets-custom-function]

Use for questions about Google Sheets custom functions (created using Google Apps Script)

Custom function for Google Sheets, written in JavaScript.

Could be used together with

Useful resources

59 questions
2
votes
1 answer

"Reference does not exist" error when executing a custom function

I am writing a function in Google Apps Script and it seems the last error I need to get around is a "reference does not exist" error in Google Sheets when I call my function. I don't know what to do about this because it doesn't seem to be a problem…
2
votes
3 answers

Can I pass an array into a Google App Script method from a Google Spreadsheet?

Can I pass an array into a Google App Script method from a Google Spreadsheet? Suppose I have an App Script function that expects a list with two elements (note: this example is just an example so please do not tell me that my problem would be…
1
vote
3 answers

OnEdit-trigger combined with cell-functions

I have an onEdit-script which calculates the value of a cell based on the content of a row of other cells. I need this script to be in an onEdit-trigger rather than a regular cell-function because I don't always want the calculation to be redone…
1
vote
2 answers

-Custom function return does not update

I have been making a script that finds a number (rank) associated with a nickname. I have created a custom function for this. Basically the formula input finds that input (a nickname) in an array of nicknames, it translates the array order into row…
1
vote
1 answer

How to get auto refresh google spread sheet custom cell fuction from google app script [ custom fuction refresh ]

how to get current list of sheet names automatically refresh by google app script when making new sheets or changing sheet name or duplicaing sheets or deleting sheets from google spread sheet :::::: I need list of sheets name :::::::::::: There…
1
vote
2 answers

SpreadsheetApp.openById displays error when run via the onOpen command

I suspect this is a simple fix but I'm having problems in my Google App Script, I have read a number of posts that indicate these functions are deprecated in custom functions but I'm lost how to fix. I have a script that is run automatically when…
1
vote
1 answer

How can I not execute a function at open a sheet?

I made a function on google sheets that make a request for an external link. I call the function as this: =functionimade(params) But, always I open the sheet, the funtion is called and the request made. How can I solve it? I want to make the…
1
vote
1 answer

setValue() or setFormula() with complex formulas/"You do not have permission to call setFormula"

So I keep getting this error message in my spreadsheet when I try to run my code in google script: You do not have permission to call setFormula. I tried with both setValue() and setFormula() and the error is the same. I saw somewhere that…
1
vote
1 answer

Conditionally Run Google Sheets Custom Function

I have developed a custom function in Google Sheets which is consuming a paid API. The problem is every time the sheet is opened the function refreshes (normal Google Sheets behavior). How can I work around that? How can the function run only in…
S.aad
  • 518
  • 1
  • 5
  • 22
1
vote
1 answer

Dynamic cell position; No permission to call setValues

So I have a sheets that tracks my work hours via IFTTT and I wanted to add a script to my Sheet such that at the end of my work week it can be called and it will put "End Work Week!" All in different columns but in the same row.....However for the…
1
vote
1 answer

Inserting Google Spreadsheet ID in cell

Attempting to insert the value of the spreadsheet ID, and sheet/tab IDs into cells in my spreadsheet. Found this answer and tried the code as a script: How to fetch the ID of a Google Spread Sheet via Google Apps Script? Then I ran into this error…
1
vote
1 answer

Stop a custom function from recalculating every time the spreadsheet is open?

I have a custom function that uses fetch to save some information to a spreadsheet. The problem is, it's meant to be used many times on the spreadsheet, fetching from various pages. As the amount of uses increases, needlessly re-fetching information…
1
vote
1 answer

Google Sheets Custom Function Timing Out

So I have been having erratically getting an error: "Internal Error Executing the Custom Function" when running my custom function on a decently sized range of cells. Google specifies "A custom function call must return within 30 seconds. If it does…
1
vote
1 answer

Google Scripts Error: "You do not have permission to call sort"

I am trying to run a custom function within Google Sheets. I do not get a compile error but when I try to call the function, I get an #ERROR along with a message, You do not have permission to call sort Is there a way to get around this problem?…
1
vote
1 answer

Google script setValue

I'm trying to learn how to manipulate with cell in Google spreadsheets with Google script. I have learned, that Custom functions return values, but they cannot set values outside the cells they are in. In most circumstances, a custom function in…