Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [google-apps-script]

For questions about using Google Apps Script to extend Google applications

0
votes
0answers
22 views

How to show a popup instead of an html file that returns from doPost() function in Google Apps Script

I work on a Google Apps Script project deployed as a web app that sends an HTML form and some data - submitted from a Google Form - to an email so I want when someone submits this form a popup shows ...
0
votes
0answers
23 views

Script for creating weekly tabs from a due time interval

I'm a newbie for both scripting and Google scripts. I basically need to create a sort of timetable on a Google Spreadsheet in which every tab is a week, always starting by Monday, in a due interval ...
0
votes
0answers
33 views

Help implementing custom canned response code in Google Script

This is a follow-up question to this one: Is there a way to avoid "+canned.response" in the email address using Gmail's canned response feature I was very encouraged by Jacob's code and ...
0
votes
1answer
301 views

Send email when theres a change in a particular column on a particular sheet

I want an email to be sent when a cell is changed from "No" to "Yes" in column C from a particular sheet - sheet1. The email body would need to include information from cells in columns D,E,F,G,H,I,...
0
votes
0answers
25 views

Script to duplicate rows but continue formulas

I feel like my script is close to the goal, yet so far. I'd like to take the current row that the user is clicked on, and then insert multiple new rows below the current row, but also continue the ...
0
votes
0answers
23 views

Change color of query-filled cell via script based on cell content

I used the following script proposed in a different question (How can I change the background color of a cell based on the cell contents using a color lookup sheet?) to change the background and font ...
1
vote
0answers
110 views

Google Apps Script - how to hide run message

I have a question about running apps script on a Google Sheet. I have a few scripts written that can apply a filter and remove a filter. When I run the script from the button on the spreadsheet the ...
0
votes
0answers
438 views

Update Cell If another cell is not empty - Google Script

There are two columns N and O. When any cell in column N is filled the adjoining cell in column O needs to filled with "Yes" if not it stays empty. This is the script I'm using. var s = ...
0
votes
0answers
65 views

Automated forwarding of an email in Google Apps Script

Good day. I have an email account which is not a Gmail one but is added as an alias to a Gmail account. Based on that, I have the following 2 questions: How can one listen for incoming emails (to ...
1
vote
1answer
585 views

Does IMPORTRANGE automatically update the destination if the source is changed?

Not sure if this has been answered else ware but, I'm trying to use the importrange function in Sheets to import a list of dates from spreadsheet A to spreadsheet B. That part works fine, however, if ...
-1
votes
1answer
3k views

Which is better: onEdit or onChange trigger? [closed]

From what I've gathered online, onEdit only works when you edit a cell (not when a row is added or when a note/comment is added). onChange will capture that a change has occurred and trigger when ...
2
votes
1answer
322 views

Colors in conditional formatting based on cell hex values [duplicate]

I am looking for a solution to change background and font color of a cell based on hex-values in another cell. I am managing a google spreadsheet for an online basketball league. I have several ...
1
vote
0answers
107 views

Sync Google Spreadsheet to Google Calendar (remove any duplicates)

I'm trying to sync my Google sheet to my Google Calendar. However, I keep running into errors. I've tried a myriad of scripts, but none seem to work. I got one to work, but every time I ran the script,...
0
votes
0answers
32 views

How to automate Gmail response, different first and second response?

I am seeking help to automate the Gmail response to new community members in an apartment complex. First, new members send/email us a new membership, including name, i.e. request as a new ...
0
votes
0answers
21 views

Copy a sheet, automatically move it to the front and rename based on the previous sheet

I have a daily cashing-up spreadsheet where each day has a sheet using the date format YYYYMMDD (e.g. today is 20180808. I want to automatically copy a sheet, move it to the front (leftmost sheet) ...
0
votes
1answer
37 views

Calculating Ranks in Google Sheets

I have a spreadsheet that has three tabs: The first tab is raw data imported from a website. it's about 10 columns and up to 300 rows. it has a mix of numbers in decimal form and percent. it all ...
1
vote
2answers
258 views

Add border to whole row if cell in column D is not empty

I was researching how to "Add a border to the whole row if a cell in column D is not empty" - I've found similar script but I failed to edit it to my need! Below is the script I found - I already ...
1
vote
2answers
163 views

Auto-create/name new Google spreadsheets for names in column list [closed]

How do I auto-create multiple spreadsheets from a list of names contained in separate rows in a 'master/template' spreadsheet (up to 50 names, if possible)? I think I am looking for a script/code/...
1
vote
2answers
85 views

Display the name of a cell in a worksheet

Excel has a little box on the upper left corner that displays the name of the cell. Does Google Sheets have a similar capability? I've named cell B5 "hours" and cell B6 "hrlyrate" so I want to be able ...
-1
votes
1answer
44 views

One time check to see if document is shared with a specific user

I'm trying to figure out how to write an Apps Script that checks "IF" a Google Drive URL is shared with a specific user. I do not want this to be a continuous check, just a "one time check". Example ...
2
votes
1answer
60 views

How can I automate Find & Replace (to change the colours of certain symbols) in Google Docs?

How can I automate find & replace, specifically to colour all suit symbols document wide? I write bridge articles (card game), and I need to automate this formatting all the time: Find all "♣" ...
-1
votes
1answer
64 views

2 time stamps in different cells I would like both of the scripts below to work at the same time [duplicate]

function onEdit(event) { var timezone = "GMT-7"; var timestamp_format = "MM-dd-yyyy-hh:mm"; // Timestamp Format. var updateColName = "Ext Warehouse"; var timeStampColName = "Date/Time Change";...
0
votes
1answer
41 views

How to extend script on next column?

How should I modify the script, in a way that it would work also in another column, eg. by putting data in A:A date will be printed in B:B and also in C:C function onEdit() { var sheetName = "...
0
votes
0answers
94 views

How to automatically forward Gmail messages when a label is applied?

I have found this question that is answered: How can I automatically forward Gmail emails when a label is applied? However I'm using that exact script and have replaced the label and recipient with ...
0
votes
1answer
83 views

Timestamp for Edits Made to 1 Cell Only

I have this script that works perfectly for any edit on the spreadsheet page: function onEdit(e) { if (!e.value) return; e.source.getActiveSheet() .getRange('F29') .setValue(new ...
0
votes
1answer
209 views

Google Script to set the current month once a day only in a cell

Currently, I'm using (Month(NOW()) to set the current month number in cell $D$1 of a spreadsheet. I know Month and Now are volatile functions and they're making the over sheet update way too slowly, ...
0
votes
2answers
2k views

How to format the time in this Google Apps Script

I want to format a Google Sheet cell when I read it in my script but it comes out 25 minutes later. The cell's time is 20:00:00 but the output is "20:25". I am using this var formattedDate = ...
0
votes
0answers
88 views

Google App Script - Append Table to Google Doc

I am having an issue appending a table from a google sheet into a google doc via app script. if(rtemp == "tblhead") { //http://www.googleappsscript.org/home/create-table-in-google-...
0
votes
0answers
26 views

Google Sheets onEdit automation and separating strings in a cell

I'm compiling a google sheet with a list of Form Responses after answering questions on a google form. This is what the google From Response Page would look like: I want to compile a script so that ...
0
votes
1answer
140 views

Count consecutive columns with the same values?

Before I get started, here is a link to the sheet example: https://docs.google.com/spreadsheets/d/1HpkCoKSp7fA8I312m_kiinvgUv47qevutVluOM3-Jbg/edit?usp=sharing Essentially what I want to do is Count ...
2
votes
2answers
457 views

How to execute a trigger only when one of the sheets is changed

When I have multiple sheets in a google spreadsheet, I want to execute a trigger only when One of the Sheets is changed, not the others. OnChange() or OnEdit() is executing the trigger for any data ...
0
votes
1answer
25 views

Google site, add common Google Apps script project to be called by other projects

I have created a Google site, in manage site there is option to add Google apps script and I can add multiple Google Apps Script projects that can be embedded in Google Site. Please see below ...
0
votes
2answers
248 views

onEdit stops working when other function is run

I'm working on a script to help with a spreadsheet we use at work, but I'm having an annoying bug with the onEdit() function. After running the script from the script editor, it operates as intended (...
-1
votes
3answers
530 views

Auto-updating timestamp [duplicate]

In a particular cell of a column, I would like to have a timestamp of the last date any cell of that column was modified. Specifically : G31 would show date of last modification on any cell of the G ...
0
votes
0answers
91 views

Google Scripts Range not updating Sheet

I'm writing a program where part of the core functionality is sorting the input rows by information found in multiple columns (chapters>lessons>entry-type...). I'm attempting to do this by sorting ...
0
votes
2answers
150 views

Google App Script - changeType “REMOVE_GRID”

I'm using a Google spreadsheet. I'm attempting to create an onChange trigger that will activate a script when any sheet is added or deleted. I was able to get the script to work when a new sheet is ...
0
votes
0answers
110 views

Use Google Script to copy current row and row above onto an archive sheet

I'm looking for a way of modifying the script shown in the answer to the question submitted via the below link Cut/Paste projects from Google Sheet using Script to include the current row (B) and ...
0
votes
1answer
327 views

Using Google Apps Script add-on without publishing

I've just written my first Apps Script add-on for showing some links in a sidebar of a Docs document. It looks like the way I created it made it bound to a specific document (the one from which I ...
1
vote
0answers
18 views

Script to place duplicate Google sheet beside the sheet it copies (instead of the end)

Is there any way to modify my script to have the sheet it's copying insert the new sheet immediately to the right of the one it's copying? I have tons of tabs in the file, and it's starting to get ...
-1
votes
2answers
50 views

Google script insecure?

For a couple of years a script is run in https://script.google.com, but now it is seen as an insecure app? Why? The service is provided by Google right? Third party?
2
votes
1answer
53 views

How to send Google Form results to a particular SHEET (“tab”) of a spreadsheet

Is there a way to create a Form that submits to a particular TAB of a Google Sheet? Use Case We are using this for meeting pre-checkin. There's standard form. I'd like the results for each ...
2
votes
1answer
52 views

Truncate Text returned from indexhtml

I'm new to making spreadsheets. I'm making one for a game I play. I'm trying to use an api call to return json data from the games exchange website, to update prices in near real time. However I don't ...
-1
votes
2answers
877 views

How do I update one column based on the value of another using a script?

I would like to change the value in the D column based on the value of the C column if the cell in C contains "YES", using a script instead of a formula. Sample spreadsheet
1
vote
1answer
110 views

Linking multiple script created forms to 1 sheet in pre-existing spreadsheet

I work in manufacturing. I have created a Google form for our leadership safety audits which requires unique information (name(s), area being audited, and date) and also includes 25 multiple choice ...
0
votes
1answer
46 views

getEditResponseUrls - hyperlinks from second linked form not inserting

I am new to scripts, but I was able to find a one that uses getEditResponseUrls to insert the edit link from a form into a Google Sheet. I've now been asked to add a second sheet to my spreadsheet ...
0
votes
0answers
632 views

Auto insert current date when a cell value changes to one of two specific values

I am trying to enter the date and time when a certain query gets resolved. I am using the below script for entering the create-date timestamp in column T, however I would also like to add another ...
1
vote
0answers
334 views

Adding multiple choice questions to sections of a Google Form via Script

I am working on a survey using Google Forms that I generated via a script. There are over 2000 questions that are all the same format but are broken up into different sections. So, for example, ...
0
votes
0answers
18 views

Protect a cell based on a value of a cell from another sheet

I need to disable editing on a specific cell based on a cell on a different sheet if sheet1!B1 is 0 sheet2!B5 disable edit
0
votes
0answers
265 views

How do I resolve an invalid argument in this script to collect Google Form edit response urls?

I am trying to add script as per previous questions here and here. However I am not getting any links populated and I have an invalid argument. Please see error message and script below. What am I ...
4
votes
2answers
3k views

Add a CheckBox with a script

How can I use a script to add a CheckBox to a Sheet? This is probaly trivial but I could not find a single example online and the CheckBox class isn't even mentioned in the docs. From the GUI, I ...