Questions tagged [google-apps-script-triggers]

User for questions about using triggers in Google Apps Script. On questions about simple triggers, use together with google-docs, google-sheets or google-slides according to the app where the simple trigger is being used; on questions about installable triggers, use together with the mentioned tags but might also be used with google-forms. It might also be used together with google-apps-script.

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

Determine if onEdit() was triggered by inserting or removing a row

I have two spreadsheets, SS1 and SS2. I need to update SS2 when a row is inserted into or removed from SS1, or when a certain range of cells is changed in SS1. I use an installed onChange() trigger to ...
Marshall Morrise's user avatar
2 votes
1 answer
37 views

How to do autoresizecolumns() in a Google Sheets file when data imported from another Google Sheets file is changed

I'm new to Google Sheets and apps scripts. This is my first ever question. I apologize in advance if I don't get it quite right. Google Sheets file Staff Roster sheet Roster contains names, contact ...
Marshall Morrise's user avatar
1 vote
1 answer
104 views

SpreadsheetApp.openById gives unauthorised error

I am trying to trigger a function in Google Apps Scripts, and am using openById("Sheet_Id); But on using it, I am getting this error: Exception: You do not have permission to call SpreadsheetApp....
Zaid Bhimala's user avatar
1 vote
1 answer
21 views

onEdit updates correctly, but then overwrites following columns after pasting (editing) multiple rows

I'm using Google Spreadsheets and found a script here: onEdit only updates top row after pasting (editing) multiple rows I manipulated the script to fit my needs, and I need it to only look at column ...
Jan's user avatar
  • 13
1 vote
1 answer
68 views

How can I Speed up an onEdit script so that it captures all subsequent edits?

I have a bit of script to capture changes made to a table of information, pulling the new value as well as the person's ID, a category, and the reference of the item being changed. Altogether the ...
Roli Payne's user avatar
0 votes
1 answer
52 views

Google Sheets Date/Time Stamp

I have a Google Sheet with a dropdown menu in column U.I would like column V to timestamp when column U is changed. I've used the following code however this only timestamps the first time that column ...
Martin Kings's user avatar
0 votes
1 answer
38 views

Remove protection from a specific cell when contents are deleted

I am trying to remove the protection from a specific cell after its content is deleted and then change its background to white. Here is the script: function onEdit(e) { var spreadsheet = ...
Gene Arquilla's user avatar
1 vote
1 answer
264 views

function no longer working on mobile

I have a function that uses the onEdit trigger. It was working great both on PC and mobile yesterday, but today it no longer works on mobile but still functions on my PC. Not sure what is going on. ...
Chris Mcghee's user avatar
0 votes
1 answer
433 views

Buttons don't work on iPad with Google Sheets - the onEdit(e) workaround isn't working. Suggestions?

I have a button that works with the function Yeah_Go(), but only when using it on a browser on a laptop. When I try to press the button on an iPad Google Sheets mobile app, it doesn't work. Instead, ...
Chris's user avatar
  • 103
1 vote
1 answer
2k views

Cannot find active sheet: TypeError: read properties of undefined (reading 'source')

I'm trying to add the current date to a cell in column K when any cell in that respective row is changed. I found this script and altered it for my situation so I can deploy it as a trigger: function ...
Adam's user avatar
  • 449
0 votes
1 answer
31 views

I can not remove data validation with 2 criterias - Function onEdit(e)

I would like to run function onEdit(e) to remove Data validation with these 2 criterias as below: Remove for columns G,H,I,K if L is "no need". Remove for columns M,N,O,Q if R is "no ...
Caroline's user avatar
0 votes
2 answers
361 views

How to create pop up and add link to a cell

I have a sheets file that requires users to inserts links in the cells of a specific column when they add the information required. However, to make sure this step is done accordingly, I would like to ...
Diogo VIEIRA's user avatar
1 vote
1 answer
103 views

How to set up a submit button from sheet 1 to remove the protection on sheet 2 so a new user can input data, and then it will lock back up again [closed]

I have 2 sheets (Sheet 1 & Sheet 2). Sheet 1 is protected besides a few fillable cells, including an apps script button to log the entered data to Sheet 2. Sheet 2 is protected and can not be ...
Delta's user avatar
  • 11
0 votes
2 answers
758 views

Blinking cells in Google Sheets

I am trying to get a cell to blink when a file is opened. I currently have the following code that I have found from here, but don't know how to modify it to blink when the file is open. Can anyone ...
Duyen Bagwell's user avatar
2 votes
1 answer
91 views

Timed Triggers for Macros on Multiple Sheets in a Spread Sheet

I'm trying to make a student signout sheet for a whole school. We have one main spreadsheet but multiple separate sheets within that (one for each homeroom, about 25 homerooms so 25 sheets). I created ...
Lauren Andrews's user avatar
2 votes
1 answer
86 views

Creating a reset button

I have a sheet where i can put in number and mark check boxes when I have put in a number and it calculates what i need. But its always a hassle removing all the inputs and check marks when I am ...
Zaloz's user avatar
  • 21
3 votes
1 answer
319 views

Add a script trigger to Google Sheet that will work in Android mobile app for merged cells

I'm new here, and I have my first question regarding the following post here: Add a script trigger to Google Sheet that will work in Android mobile app function onEdit(e) { if (e.range.getA1Notation(...
TraianBrad's user avatar
0 votes
1 answer
141 views

How to add date stamp when criteria met in google spreadsheet?

This is the current script. When a cell in column 26 is edited, a datestamp is added to the cell beside it in column 27. Now I would like to add additional criteria. Example: When col 26 value is &...
Thant Zaw Lwin's user avatar
1 vote
1 answer
34 views

Syncing multiple Google Sheets worksheets into one large Google Sheet document

I have several different Google Sheets workbooks with multiple pages that I'm trying to have sync into a master file whenever they are edited. I cannot have all of the people on the separate documents ...
Julie Carter's user avatar
3 votes
1 answer
651 views

Google Sheets: On change, delete a specific row if a certain cell is blank

I have a tab on a spreadsheet where if you add a new row to the first row specifically, it breaks the formulas in that tab as they are on the first row. Therefore, if someone adds a row to row 1, I ...
dea's user avatar
  • 63
1 vote
2 answers
84 views

Prevent Google spreadsheet editor from accessing GAS by using detached GAS

The solution is sketched in this post, but it seems key steps are not identified. This code works fine if in GAS bound to the spreadsheet: function onEdit(e) { var sheet = e.source....
Doug Sacarto's user avatar
0 votes
1 answer
126 views

Why does my script return a TypeError when comparing getA1Notation to a string?

I am trying to write a custom script that is bound to my Google spreadsheet. I want to trigger it using onEdit(e) based on the value changing in the dropdown located in B3 of 'Pax Split Sheet'. I had ...
Rob's user avatar
  • 11
0 votes
0 answers
338 views

Auto create new sheet when new data in column?

I'm trying to create a new sheet on google sheets whenever column B gets a new value. This sheet will be named the value that created it. . I also want to have a function in the new sheet that ...
Giovanni Guarino's user avatar
2 votes
1 answer
72 views

Is setting a trigger for a function to run with a triggered function not allowed?

I would like my function freezeSunday to run at exactly at 1pm on Sunday. Since it does not appear that you can trigger a function to run at a precise time (only at a randomly selected time within a ...
Mark Neal's user avatar
0 votes
1 answer
144 views

Color Cell by using the note in Google Sheets

Whenever I try to use the following script... function onEdit(e){ if(e.range.getNote()){ e.range.setBackground('green'); } } I get the following error... TypeError: Cannot read property '...
Highland Ranger's user avatar
0 votes
1 answer
447 views

How to create static/immutable autoincrement column

I am aware of the manual way (add 1,2 in the first 2 rows, mark them, drag the square on the mark-outline down to where u need the numbers) and a number of ways to create the numbers with formula's, ...
sirtet's user avatar
  • 1
0 votes
1 answer
730 views

"#NUM!" error in Google Sheets Script

When trying to Run the following script the result is always a #NUM! error - (Result is not a number) in cell "O5" Both the cells are in currency format and I've tried changing them to ...
Cristian Gabriel's user avatar
1 vote
1 answer
52 views

Google Script Substract Function

I want to create a script function that I will use with daily triggers: function will subtract "Daily Fees" (a cell value that changes daily from "Open Trades" sheet) / from "...
Cristian Gabriel's user avatar
0 votes
1 answer
86 views

Auto add a row based off a check box

I'm a new user to Sheets! I'm reaching out for help on a problem that I have with trying to create row. I've read a ton of blogs, and watched more Youtube videos than I care to admit without finding a ...
Josh's user avatar
  • 1
0 votes
1 answer
35 views

Multiple functions updating datetime stamp in multiple cells [duplicate]

I am trying to update multiple cells based on input in each. The first works fine with a specific text from dropdown but I get no results on the other remaining 3. Here is the script I have: function ...
Linwwood's user avatar
0 votes
1 answer
45 views

Is it possible to write a script that automatically triggers some function within a Google Sheets add-on?

I'm using some Google Sheets add-on which pulls information from API databases, and it has both a free subscription and paid subscriptions which add many additional abilities which I don't really need,...
TLSO's user avatar
  • 135
0 votes
1 answer
148 views

End of day data with trigger in google sheets

I want to copy/paste the values of a specific column into the next column using a trigger at a certain time of the day. The script works when I run it manually, it runs as per 'last run' via trigger ...
rainer jaeger's user avatar
0 votes
1 answer
422 views

Script in Google Sheet to automatically run after importing CSV files to replace current sheet

I'm going to admit I'm a newbie at scripting. I've managed to write the script that I want but I want it to automatically run after importing the CSV file onto Google Sheets. I have tried a simple ...
Aryan 's user avatar
0 votes
1 answer
470 views

How to speedup Google Sheets script?

I have a script adapted to my needs which was created following this. I think my script is getting slower over time after adding more entry point in my sheet form. // Function to submit the data to ...
rizanoar's user avatar
0 votes
0 answers
196 views

Notification email with data from different columns when edit is made to cell in the same row [duplicate]

I've browsed similar questions but I'm a bit flabbergasted. Google Sheet name: Book List Records Tab Name: Books sent to Wisconsin When any cell in column E is (manually) changed in the tab mentioned ...
Cael's user avatar
  • 9
0 votes
1 answer
240 views

Copy Row Script & Paste at last Row in the Same Sheet

Do you guys have idea in script how can I copy the details on quotation GE-2108-0271-Rev.0 in few pages and paste the row at the bottom in the same sheet? Page 1: to be exact I need the number ...
Biha's user avatar
  • 1
1 vote
2 answers
494 views

Help with dynamic dependent dropdown

How do I change this dynamic dependent dropdown list script so it works with my particular Google Sheet. function onEdit(){ var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); var ...
user246475's user avatar
-1 votes
1 answer
77 views

Sending email with check box formula gives me range error using script

Here is the script for this it keeps saying range undefined and I cant figure it out function onEdit(e) { // this script is installed as an installable onEdit trigger /* if the checkbox is ...
Ryan J Averbeck's user avatar
0 votes
1 answer
611 views

How can I use the onEdit() trigger to timestamp a cell if another cell in the same row is checked "TRUE" in apps script?

I am able to add a timestamp in column 5 using a conditional when I'm comparing the column to a number, but what I am actually trying to do is add a stamp to the corresponding cell in column 5 if a ...
NeophyteLou's user avatar
1 vote
1 answer
3k views

Hide/Unhide rows based on values in particular cells

I am trying to Hide/Unhide rows based on values in particular cells, have the following code which works in isolation but not together. Below only makes B121 be active while B55 stops working. If i ...
user275230's user avatar
-1 votes
1 answer
409 views

Google Sheets Appscript on apply filter event?

I want to execute a script as soon as I apply a filter to my Sheet. I can't find any event in the App script Docs that will allow me to do this, no onFilter event or anything obvious anyway. Does ...
Frank Rosario's user avatar
1 vote
2 answers
3k views

Trigger for onChange on add new row only

I want the trigger which work for 'add new row' only, but not other edit function. Right now the changeType of the onChange are Edit(include add new row), INSERT_ROW (but not add new row), etc., which ...
TropMed RiskManagement's user avatar
1 vote
1 answer
61 views

How do I code 3 series dependent drop down on multiple sheets?

I have a code to run a 3 tier dependent drop down list - it currently works for one sheet in my workbook named "BlankNode" but I need it to work for ~20 different sheets. I tried adding a ...
user271826's user avatar
0 votes
1 answer
1k views

Trying to run two functions onEdit

I have found two scripts that work independently, but fail when combined. I get this error message ReferenceError: myfunction2 is not defined onEdit @ Code.gs:3. I want one field to populate the ...
Chuck Shaw's user avatar
0 votes
2 answers
287 views

Generate sequential numbers in first column based on value in other column

I'm having a problem implementing a spreadsheet with several sheets that use data registered continuously on the first. I found a solution with this script on the forum but I don't know how to edit, I'...
Vitor Hugo Fernandes's user avatar
0 votes
1 answer
755 views

Depending on Sheet being edited, get a cell value and trigger OnEdit update

This code works but not as intended. The workbook has several tabs (Sheets) and if the user is editing Tab1, then and only then a trigger OnEdit should execute. If the user is editing some other tab (...
rosa's user avatar
  • 85
-1 votes
1 answer
108 views

Trigger fails when executing sendEmails function

I created a script to send emails with calculated information from a sheet. The script works beautifully when run manually. I would like this to trigger every minute, but when I try to create any kind ...
Jason Rich's user avatar
0 votes
1 answer
521 views

How to trigger onChange trigger on inserts only

I am trying to create a trigger that sends emails when lines are appended or inserted to a sheet. The problem I have is that the python script that is connected to the google sheet purges sheet "...
XanthanGum's user avatar
0 votes
1 answer
88 views

On Google Forms, can someone edit their response but can't add a new one?

For example "someone 1" edits their response via the link that I have added in the Google Spreadsheet (https://drive.google.com/file/d/1gtULaR5VEfuLOP4f73Z3KofsnksmpSid/view?usp=sharing), ...
Ismynr's user avatar
  • 103
1 vote
1 answer
46 views

How to to get coordinates from addresses coming in from importrange?

I have addresses coming in from importrange and I am using this script to get coordinates. function myFunction() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Geo 4') var range =...
John K's user avatar
  • 11