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)

2
votes
1answer
709 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
2answers
28 views

Search for value in another spreadsheet [on hold]

I am attempting to make a Mail Merge script for a job. The following will happen: The person will submit a form (an evaluation) in this script They will select the person they are evaluating. ...
1
vote
0answers
18 views

onEdit Script to auto run Filter on a tab

I'm trying to find a script that will run in a particular way, see below: it runs on a specific tab in a spreadsheet needs to either re-run a filter that i have in place on the tab OR can filter out ...
0
votes
1answer
168 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 ...
0
votes
1answer
918 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 ...
1
vote
1answer
124 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 ...
3
votes
1answer
308 views

Can a Google Spreadsheet be recalculated if it's not manually opened?

We have some Google Spreadsheets that use the ImportHtml() to pull in some real messy tables. Then on on an alternate page we access the above data and pull it into a nice cleanly formatted table via ...
3
votes
2answers
1k views

Iterated variable (i) for argument on range in Google Scripts API

for (i=0; i<numItems; i++) { var cell = sheet.getRange(12,i); cell.setFormula(i); } This simple formula should go to every place on the column 12 where there is data, and replace it ...
0
votes
2answers
599 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 ...
0
votes
2answers
58 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
2k 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 ...
2
votes
1answer
13 views

Adding a script to Google Forms to identify incorrect phone numbers

I currently use Google Forms as a way for applicants to submit their forms. One of the fields that is required is for their contact information. In my country phone numbers have 11 digits. Is there a ...
2
votes
1answer
73 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 ...
0
votes
0answers
16 views

How can I get the response ID of the person opening the form in the onOpen function in Google Forms?

I am using the following code in hopes of getting the responseID for the user who is editing their previous response to a Google Form. The problem is that the ID appears to be related to the ...
1
vote
0answers
79 views

Auto paste formula on form submission

I have searched and tried various solutions elsewhere but none seems to work for both conditions. I would like to have the formula: =IF($A2="Elementary", VLOOKUP($B2,'ELEM PRINCIPAL'!$B:$AA,7,false), ...
1
vote
2answers
446 views

Why Gmail Meter is not working

I added Gmail Meter to my Gmail account but it never reported anything. Do you know what could be the matter? I worked to authorize and add the script, then I waited and nothing happened. When I go ...
1
vote
1answer
803 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
456 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
2k 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 ...
1
vote
1answer
195 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 ...
3
votes
1answer
518 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 ...
2
votes
1answer
483 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.
0
votes
1answer
214 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 = ...
0
votes
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
147 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 ...
2
votes
3answers
5k views

Google Scripts : How to distinguish Empty cells from Zero

I want to count a number of specific responses from a form where the response can be left empty, zero or any other number 'd'. The following code: var data = sheet.getRange("B2:L").getValues(); ...
0
votes
1answer
46 views

Sum cells according to cell colour

I want to sum cells only with a specific cell colour. I'm using this code: function sumWhereBackgroundColorIs(color, rangeSpecification) { var sheet = SpreadsheetApp.getActiveSpreadsheet(); ...
0
votes
1answer
39 views

Script that adds new row to multiple sheets in Google Spreadsheets

I want to add a script in Google Spreadsheets that adds new row on the second line of every sheet within a Google Spreadsheet that contains multiple spreadsheets. This will need to happen every day.
1
vote
1answer
21 views

Script to only show timestamp when a specific column is changed?

I want to take an existing script from a Google Spreadsheets and change it so it only updates the last column when I make a change to a specific column in the last row. I can't get it to only key off ...
6
votes
2answers
3k views

Pass range in Google Apps script custom function without using A1 notation

I'm new to Google Apps script and I would like to create a function for a spreadsheet that sums cell values when the cells meet certain criteria, such as the background color. Moreover, I'd like to ...
2
votes
2answers
2k views

Is it possible to pull my Company directory into Google sites intranet?

We use Google apps for enterprise, and I want to build an intranet, based on the Google sites intranet template In the Directory area, I want that the list will be updated from my contact/company ...
2
votes
0answers
62 views

How do I refresh script results when a cell color is changed?

I have a Google Spreadsheet that contains a script to count a number of cells by color. The script works perfectly but seems like when ever I change the color of the cell, the count is not updated. ...
0
votes
1answer
489 views

How can I record the date/time when a new row is added?

I want to add a date value when a new row is added in Google spreadsheet. I have seen the script on Add a 'creation date' value when a new line is edited, but I was not able to modify the code to my ...
2
votes
2answers
458 views

Viewing all group contacts information in one page

Say I have 5 contacts in a group. I would like to see all their details in one page (/view), preferably separated by an horizontal line between every contact. Is something like this possible?
2
votes
2answers
610 views

Is there a way to add a row to a Google Spreadsheet via a script?

I'd like to be able to call a script, which will add a row to a Google Spreadsheet, and manage stuff like user login. For example, gdocs_addrow --id <doc-id> name="John Doe" age="31" I know ...
3
votes
3answers
3k views

How can I make some data Autosort in a spreadsheet on edit?

I am working with a simple spreadsheet that has name/lastnames in it. I need for the spreadsheet to automatically sort the entry alphabetically by the last name (column B). I have used the following ...
2
votes
0answers
58 views

Batch Hiding Function in Google Script

I wrote a function that iterates through every non-blank row in the sheet, checks the value of a certain cell, and then if that cell matches my criteria its row number is added to an array. I then ...
6
votes
2answers
3k views

Colorize a cell in Google Spreadsheets based on cell data

I'd like to colorize a cell based on it's contents. 0 = red, 100 = green, and linearly interpolated between. function LinInt(x){ var ss = SpreadsheetApp.getActiveSheet(); var cell = ...
2
votes
3answers
91 views

Code invoked too many times

My goal is pretty simple: take the value in column U and check if it's within particular ranges. If it's 1–100, put a 1 in column A. If it's 101–200, put a 2 in column A. The problem is, I have almost ...
6
votes
2answers
7k views

How to Refresh a cell in Google Spreadsheet?

I have a column in Google Spreadsheet that calls an outside webservice using URLFetch in a Google Script. The cell uses two parameters in that cell's row. After a change occurs where those two ...
2
votes
1answer
69 views

Run script when clicked on picture in published Google spreadsheet?

I used the script underneath in Google Spreadsheet and added an image that when clicked upon runs the GOTOSHEETONE function to navigate to sheet: SHEETONE. So far so good. However, when I publish my ...
1
vote
2answers
1k views

Can I copy row from one Google Spreadsheet to another based on certain criteria

I have a spreadsheet to track student loan outs: Column A is the student name Column B is how many loan outs they have received Column C is the class period Column D is the teacher name ...
1
vote
0answers
110 views

Can I fill specific cells in my spreadsheet when submitting a Google Form?

I have a Google Spreadsheet that contains a list of dates, and empty cells. For a variety of reasons, I'd like to be able to have people add fill out a Google Form where they select a date, and fill ...
0
votes
1answer
24 views

Add contacts to all new addresses

Is it possible to automatically add contacts to new GMail accounts created under your Google apps account? If so, how can I achieve such a thing?
0
votes
1answer
87 views

Google FormsApp: Change item based on answer

Is it possible to change item, in my case - checkbox, based on user answer? For example, I have Date item, where user have to put his/her birthday, and then if user is born on 2001 or later, then add ...
1
vote
0answers
113 views

Entering time data quickly using code for a specific range of cells

What API code do I use if I want to quickly enter 24 hour times (without entering the colon and still retaining time formatting) for a certain range of cells? I know the following code works for ...
1
vote
0answers
35 views

Send email from Google Spreadsheet to adress in column

From an existing Google Spreadsheet; every time a value is added in column M(x), I would like to send an email with a specified text to the address listed in column F(x) from the same row x. Which ...
1
vote
0answers
70 views

Trello API: How to remove a member from an organization using Google Apps Script (GAS)

In a Google Spreadsheet, I have a list of Trello usernames that I want to remove from my Trello organization. How can I use the Trello API to remove all these members from my organization? I found ...
1
vote
2answers
87 views

Gmail message details stored to spreadsheet

I would like to know if there is a way that I could have specific messages in my email to go directly in a Google spreadsheet. For example I need all email messages with subject line of "X" be stored ...
2
votes
1answer
897 views

Batch copying/renaming in Google Docs

I need to copy and rename a base form (a spreadsheet) to several other forms in Google Docs. Imagine I have the following form: My Base Form - @name (@course) After running the script or whatever, ...