Google Apps Script (GAS) is a JavaScript cloud scripting language that lets you extend Google Apps and build web applications.

learn more… | top users | synonyms (1)

1
vote
1answer
26 views

How to place invisible placeholders in a Google Doc?

I'd like to put invisible placeholders in a Google Doc so that they can be found and the content changed. In HTML, this would be a <span id="name-of-placeholder">, with the item findable via "elem ...
1
vote
1answer
299 views

Create help pop-up in Google Document using Google Apps Script

I am trying to create a Google Document that has complex questions we ask clients. I want to add a link at the end of each question that will launch a pop-up for additional information. I currently ...
1
vote
0answers
8 views

Auto Sort data in Google sheet, but by sheet not range

I have found this script from this question to auto sort a column: How can I apply a script to only one specific sheet within a spreadsheet function onEdit(){ var sh0 = ...
0
votes
1answer
12 views

Can't pass values to custom functions as parameters [on hold]

My Google Apps Script function myFunction() { var files = DriveApp.getFiles(); while (files.hasNext()) { var file = files.next(); Logger.log(file.getName()); } } returns "You do not have ...
2
votes
1answer
18 views

Google Spreadsheet Timestamp on Edit?

I got the major part of answer on this link: Google Spreadsheet Timestamp? The code on this link is below: function onEdit() { var s = SpreadsheetApp.getActiveSheet(); if( s.getName() == "Sheet1" ...
4
votes
1answer
62 views

Custom script “invoked too many times” error

Credit: Google Spreadsheets function to find distance between cities function getDirection(city1, city2, unit) { var directions = Maps.newDirectionFinder() ...
2
votes
1answer
651 views

Automatically create a new row each day, on top of older rows

I am looking for a way to automatically create a new row on top of older rows each day. Inside of this row should be the current date.
4
votes
1answer
756 views

Looping through the range of cells to test the dates

I am trying to create a function to check the dates in 'Dt' sheet and return Match or Not Match. It works fine with when I display my answer in MsgBox, but when I try to do it in one of the ...
1
vote
1answer
24 views

Create a function to copy range (values only) to a new tab at specified intervals

Looking to find a function that can copy the values only from a range I am importing from the web at a certain time. Have found a lot of functions that are similar to what I need but can't nail one ...
1
vote
2answers
1k views

Create a dropdown list of options from VLOOKUP

What I'd like to do is get a dropdown list of options from a VLOOKUP type function where I can select the value for the next lookup. Example Here the data I'm using for reference. Notice "AAA" ...
1
vote
1answer
20 views

Script to Create Copy (Backup) of entire spreadsheet onOpen

Is it possible to write a script or is there another method of backing up a spreadsheet when opened? The reason is: I have other users opening my spreadsheets and if they completely stuff everything ...
2
votes
1answer
182 views

onEdit only updates top row after pasting (editing) multiple rows

I'm using a Google Spreadsheet and have a script that updates the "last email" column with a date stamp when an employee enters an email address into the prior column. The problem occurs when my ...
3
votes
3answers
13k views

How to automatically insert a new row and retain functions/formulas from last row?

I have a table with cells that have functions/formulas, like this one: I need a script that creates a new row, copying with it the functions/formulas of the last used row. I find this script which ...
1
vote
1answer
271 views

Google spreadsheet multiple auto-sorting

In a Google Spreadsheet I have different group of cells to auto-sort ascending i.e. table range a3:c16 columntosortby = 2 table range d18:f31 columntosortby = 5 table range g33:i46 columntosortby = ...
2
votes
1answer
31 views

Importing columns across two Google Sheets in same spreadsheet

I have one spreadsheet which houses the database of my members. In the same spreadsheet, I have another sheet where I will track attendance for the events for each of these members. First issue: ...
2
votes
0answers
30 views

Adding columns automatically to Google Sheets

I am using Zaption and Socrative as assessment tools while teaching. After I download the CSV files, I import them to Google Sheets. I figured out a way of having the results sent to a PDF after ...
2
votes
1answer
846 views

If cell equals a value then move row to different Google Spreadsheet

I've got a script that sorts a Google Spreadsheet when a value in a column is changed. I'd like to add to the script the following functionality: If the value for column E = "Complete" then the ...
1
vote
1answer
1k views

Script error trying to populate form drop down menu from spreadsheet

We are trying to link a list on a Google Spreadsheet to a drop down menu on a Google Form. The twist is that this Google Spreadsheet list will be continuously updated and needs to automatically ...
0
votes
1answer
210 views

Time Triggered Script to Change Cell Contents

What I want to do is for example: A time will be manually entered into a cell say D3, when it is 20 minutes before this I want cell D1 to change to "20 MIN", WHEN IT IS 5 minutes before I want to ...
1
vote
0answers
9 views

Detect column D changes with Google Apps Scripts

I would like to detect if the column D rows in my spreadsheet are becoming a date (at the beginning those column rows are empty), so if D1, D2, D3 become a date their text or colors should blink. Now ...
2
votes
1answer
37 views

Script to create a new worksheet in Google Spreadsheet

I want to be able to have a button on a Google Spreadsheet. The user clicks on the button and a new worksheet is created based on a template (or blank existing worksheet). The new worksheet should ...
0
votes
2answers
672 views

Show data from one sheet on another if date is today

I have a list of people responsible for data verification that are changing every day. The schedule is on one sheet. And data verification is on another. What I need is to show only responsible ...
1
vote
1answer
252 views

How to send cell as argument for function?

I am trying to write a custom function for Google spreadsheets that checks the formatting of a given cell and acts accordingly. I know that I can give a string as argument and get it to work but then ...
2
votes
1answer
3k views

Get cell row and column index in Google Spreadsheet

I have spreadsheet with two sheets inside. The name of the first sheet is "fr" and the name of the second sheet "cql". Now the first sheet contains data as the picture given below. And the second ...
0
votes
2answers
158 views

Automating Predictable Received Gmail Attachments

BACKGROUND: I work in a small construction business. On a regular basis, I get emailed time sheets that I use to attach to / write invoices with. Would it be possible to Send an automatic received ...
1
vote
1answer
33 views

How can I trace precedents in Google Sheet

In Excel we can trace precedents and dependents. Can some one help me with something similar for Google Sheets? I have got the code for dependents from http://webapps.stackexchange.com/a/50149/88163. ...
0
votes
1answer
53 views

Add timestamp to two different columns in Google Spreadsheets

Need help in adding another function using the below script. I would like to have a timestamp "start" and "end" on two different columns, whenever the other two separate columns are edited. Based on ...
1
vote
0answers
18 views

Using Google Apps Script to set cursor to Headers in Google Docs

I am trying to create a Google Apps Script that could help navigate through the headers. I have currently a code searching the position with the function "findText" that I used in a custom menu in my ...
0
votes
0answers
22 views

Send to respondents a number between 1 and 10 using Google Forms?

My idea is to give to respondents by mail a number reference between 1 and 10. The idea works as follows: You have 10 boxes. When a response is submitted, automatically the form will send a email ...
4
votes
1answer
53 views

Save daily to my Gmail in Google Sheets

Right now what I have is this in a Google sheet for my company daily lunch program: function sendLunchPerkSummery() { var d = Date(); var file = ...
3
votes
1answer
980 views

Google Spreadsheets: add unique QR code field to a spreadsheet based on a form in google docs using Script Trigger

At the end of each row filled in, using a custom Google Form, I'm adding three more columns: Date of creation Unique ID QR code (it is a list of computers) Unique ID and QR code are unique. QR ...
0
votes
0answers
30 views

Google Spreadsheet, Google script, calculate

I want to grade my students and give them feedback. So they make an excercise, I will give them the feedback if they do it perfect or not perfect. I want also give them grades. Question: So I have ...
1
vote
0answers
17 views

I created a button in a panel (dialogue window), when I push the button I'd like to appear a new panel (dialogue) window

I created a button in Google Spreadsheet. When I push the button a custom window appears. In that window I have two buttons, one to close and one to see a new window. Everything goes well except the ...
2
votes
1answer
28 views

How to sort Google Sheets columns by row height

I'm working on a sheet that involves multiple columns corresponding to various data. Each column has a varying number of cells of varying heights with wrapped text. What I want to do is make the sheet ...
1
vote
1answer
2k views

Send an email with attachment using Google Apps Script

I have a Google Spreadsheet with a list of emails. I want to build a routine that send email automatically to those email addresses. I also want to attach a PDF to this email. The PDF file is located ...
0
votes
1answer
3k views

How to format the date in this Google Docs script

I've come across this rank checking script. I'm not sure exactly where I found it but it's built on Google Docs and a script which automates the rank checking process. I understand a bit of coding ...
2
votes
2answers
3k views

How do I create a multiple choice question in Google Forms based on spreadsheet data?

I am making a Google Form for evaluations. I will have a multiple choice question in there and the available options have to come from a list of items, say on a spreadsheet or a text document. I have ...
2
votes
0answers
41 views

Generate a formatted Google document from spreadsheet

As the title says, I have data (Q & A grouped by subject) that I have to export to a document file. As shown above, the source data on the left should be formatted like the example on the right ...
3
votes
2answers
47 views

How to limit the length of data in a cell in Google Sheets?

Is it possible to put a limit to the length of cell content while entering data into a cell using Google Apps Script or any other way?
2
votes
2answers
114 views

Return name of range as string in Google Spreadsheets

I have a range that is named apple in Google Spreadsheets. I thought a method like getRangeName("apple") would exist. I want to get the names of many ranges and set them as the header for the columns ...
19
votes
7answers
21k views

Text to columns conversion in Google Spreadsheets

How do you do a text-to-columns conversion in Google Spreadsheets? For example, I have the following data string in one cell: 5,233,6,2,6,7,2,2,6,6 I want to break it apart by the comma separator ...
1
vote
1answer
43 views

Google sheets: conditionally change sign of decimal value in cell for each row

Here's a preview of the spreadsheet I'm editing in Google Drive: The transaction type cell has a value of "debit" if the row is for an expense, and "credit" if it is income. I would like a script ...
1
vote
1answer
29 views

Mail merge, send as an Alias

I was working with a Google spreadsheet with a script associated with it to do mail merge via Google Apps for Education. The spreadsheet works fine, although my user wanted to be able to send from her ...
0
votes
0answers
30 views

how can i delete and erase all contacts that not delivered my email to them?

Many of my friends in the span of 15 years , changed their emails to new ones in Yahoo or Gmail. Those mailboxes are disabled by Yahoo or Gmail. When I send email to everyone via the group (my group ...
0
votes
0answers
63 views

Gmail Auto-Response, one time only

I want to set up auto-reply emails using scripts. We're currently using Canned Responses but the emails we're responding to just changed their setup so instead of sending the reply to the sender, we ...
5
votes
3answers
3k views

Cell reference with colour formatting

Is it possible to reference a cell in Google Spreadsheets so that cell where it gets displayed also displays it using the same text and cell colour formatting? =A1 Will only reference dell's value. ...
1
vote
0answers
20 views

How to add pictures to shared contacts in google contacts?

More specifically: is there a way to add a picture to external shared contacts in Google Apps for Enterprise, where the picture is shared amongst all members of my domain? I know it is possible to ...
1
vote
1answer
618 views

Google Apps Script: copy document comments?

I'm working on the following script, which is supposed to look at the current document, grab its comments, make a copy, and copy the comments to the new document. However, I seem stuck. I'm not ...
3
votes
2answers
74 views

How do you subtract two time values in military format in Google Apps Scripts for a spreadsheet?

One column is labeled Checkin Time and the other is labeled Checkout Time and finally I have a column that is labeled Total Time Worked. The cells in the Total Time worked column should subtract the ...
1
vote
0answers
335 views

How to build a decision suport app with Google forms or other Google Apps Script resource?

I want to create an app which helps newbie employers to take some decisions. So, using their answers to a form, the app asks new questions based on previous responses, something similar to a decision ...