Questions tagged [google-apps-script]

For questions about using Google Apps Script to extend Google applications

Filter by
Sorted by
Tagged with
1
vote
1answer
689 views

Creating a class roster in Google Spreadsheets from a split result

A lecturer from the European School of Physiotherapy in Amsterdam stumbled on a particular script I prepared, hoping it would resolve a problem he had. After having had a little chit chat, it turned ...
3
votes
1answer
3k views

Why would this Google Spreadsheets onEdit script be so slow (2 secs to change cells, 3 secs to update)

I've put together a script for a spreadsheet based on what I have seen here and other sources that should provide a simple username and timestamp function. I have another spreadsheet that uses a very ...
0
votes
1answer
1k views

Timestamp for columns B & D? [duplicate]

Found this script on one of the questions answered in the forum but I don't know enough to make it work. I would like it to time-stamp date and time in column B when they check in and then a separate ...
2
votes
1answer
3k 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 ...
8
votes
3answers
8k views

Can I use other font weights in Google Documents?

How can I use other font weights (such as Book 300 for Open Sans) in my documents? Adding Open Sans only allows me to use Normal 400, for example.
3
votes
1answer
984 views

How to use Google Scripts w/ spreadsheet and jotform to auto sort so the newest entry is always listed on the top row?

I'm trying to setup a form and spreadsheet database to track inventory on a daily basis at a remote location. The idea is that the person at the remote location can update our stock via a simple ...
2
votes
1answer
505 views

Creating multiple instances of a cell value in Google Spreadsheet

I have a Google Spreadsheet with the following data: A B ----------------------------- 1 | Number of responses | Value 2 | 1 1 3 | 3 ...
2
votes
1answer
411 views

Download list of contact information and check if Google Account

In order to retrieve a list of all of my contacts into a Google spreadsheet, I exported them as a Google CSV and then imported them into a new spreadsheet. Determine if the contact is a Google ...
2
votes
1answer
524 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 = 8 ...
26
votes
9answers
45k views

How to specify the entire sheet as range in Google Sheets?

The best workaround I have found so far is: worksheet_name!$A$1:$YY but ideally I would like to be able to simply write, e.g.: worksheet_name! So, does anyone know: is there a syntax for ...
1
vote
2answers
941 views

How to share Company's directory with all users using Google Apps shared Directory?

I am using the code given in the answer to this question: Is it possible to pull my Company directory into Google sites intranet? However, as it specifies, it works for admin only. Would it be ...
5
votes
1answer
5k 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 ...
4
votes
1answer
1k views

How to report which checkboxes were left unchecked on a Google Forms submission?

I have a Google form that stores its responses in a Google spreadsheet. It's set up so that whenever someone submits the form, I receive an email report of the responses. There are many places in the ...
3
votes
2answers
4k 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 with ...
9
votes
2answers
9k views

Google Spreadsheet Sort Two Columns

So I've found the following answer in regards to auto-sorting by one column, which works great How can I make some data on a Google Spreadsheet auto-sorting? However, my use case requires the sorting ...
4
votes
1answer
4k views

How do I Sum Thoughout Different Sheets

How do I create a reference to a defined interval in several sheets? Something like this: =SUM(Sheet1:Sheet2!A1)
7
votes
4answers
19k views

Connect with database and fetch data to Google Spreadsheet

I have been wondering about this for a while. We are using Google Spreadsheets a lot with my colleagues and the thing is that we always have to write down data that we already have in our MySQL ...
2
votes
3answers
2k views

Repeat range under each other in Google Spreadsheets

I have a range of two columns with year and dates. In another sheet I want to repeat this range for X amount of times under each other. How can I do this? So for example I have this range: Year | ...
4
votes
1answer
5k views

Enabling script to run as author in a shared Google spreadsheet

I created a spreadsheet that I'd like to share with anyone with the URL. The sheet contains several app script functions. These functions both change the content of the sheet and copy data to ...
3
votes
1answer
24k views

How do I automatically update a cell in Google Spreadsheets to the most recently entered in the same row?

I am trying to have one column that will show the most recent thing i entered in the row. Example: I want B2 to be the same as D2 but once I enter something in E2 I want B2 to display that. And then ...
3
votes
2answers
2k 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 ...
0
votes
1answer
6k views

How do I get an onEdit script to run on a Google Spreadsheet for all users

I created an onEdit script which re-sorts a Google Spreadsheet every time a cell is edited. The Google Spreadsheet is shared amongst multiple users and I'd like the script to run for all users, every ...
3
votes
1answer
2k views

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 code ...
0
votes
1answer
937 views

How to read a multiple values in cell in each row (separated by comma) in a Google Spreadsheet

I have problem in reading cell with multiple values and comparing the each value with column from a-z if match found then set value of the cell has '1'. Problem: I need to take multiple company names ...
4
votes
3answers
8k views

how do I get named ranges in Google Spreadsheets to be more reliable/current?

I'd like to pull values from a named range into a calculation. I have this function: function getNamedRange(n){ SpreadsheetApp.getActiveSpreadsheet().getRangeByName(n); } Seems pretty simple. I ...
8
votes
2answers
27k views

How can I apply a script to only one specific sheet within a spreadsheet?

I have a spreadsheet with two sheets called Robin and Lucy. I've made/found/mangled a script to sort the data on the sheet each time I add some data to column A: function onEdit(event){ var sheet =...
10
votes
7answers
19k views

Is there a way to link a “Choose from a list” style question in a Google Form to a list of data (e.g. in a spreadsheet)?

Is there a way to link a "Choose from a list" style question in a form to a list of data (e.g. in a spreadsheet)? This would mean that as new options were added to the list in the spreadsheet (or ...
20
votes
5answers
73k views

How do I mail merge from Google Spreadsheet to a Google Document?

With Microsoft Excel and Microsoft Word, it is easy to merge rows from a spreadsheet into pages in a Word file. This was traditionally used to make paper mailings. How can I do the same with Google ...
5
votes
1answer
294 views

Auto Sort Sheet on second entry

I loved the script put forward by w0lf mostly it did the trick however I cannot figure out a way to have it sort only when I enter data in the second column of 4 columns it does it when I enter data ...
4
votes
2answers
16k views

More Efficient Filtering Script

I'm exactly one day into writing Google scripts. I've managed to write one that will filter data in a spreadsheet with 24 columns and, for now, about 900 rows. The problem is, it's slow. Any ...
2
votes
1answer
758 views

Script gives 1899 for the timestamp year. How to fix it?

The following code was almost exactly what I was looking for to timestamp the adjacent cell after being edited. However, I need to incorporate the currnet date as well as time. The code below gives a ...
9
votes
1answer
4k views

How to re-use Google Apps Scripts in new Google Spreadsheet

I'm having an issue. Whenever I create a new spreadsheet, I'm not able to add a script I've already created. The list for recent projects or scripts is always blank. Anyone have a resolution or do I ...
7
votes
3answers
40k views

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(); var ...
6
votes
4answers
18k 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 ...
35
votes
3answers
25k views

Cumulative Sum without Script

For this question, I've created a Google Apps Script function, that calculates the cumulative sum of a range. Martin Hawksey on Google+ made a comment about a more efficient way of calculating the ...
36
votes
3answers
84k views

Auto-updating column in Google Spreadsheet showing last modify date

Trying to figure out a way to have column two auto-update to show a timestamp of the last update. I realize the doc shows a timestamp of the last modification, but we have a lot of clients accessing ...
6
votes
1answer
443 views

Non-deterministic parameters to custom function

I have a problem with Google Spreadsheets: I create a custom function using the Script Editor and it only runs OK if the parameters I pass are known (constant) values. If the parameters are non-...
3
votes
1answer
346 views

Google Spreadsheet text cell formatting question

I'm trying to create some sort of automated formatting for certain columns (except headers of course.) to take a string of numbers (and previous formatting; which should be stripped.) and format it as ...
4
votes
1answer
7k views

Creating a function that runs when a Google spreadsheet is opened

I want to create a function which runs automatically when the spreadsheet is opened. This function will make the selected cell the last cell without text in a certain column. Basically, I don't want ...
2
votes
2answers
283 views

Javascript string() function in Google AdWords

Is there a simple way to implement the Javascript string() function in the basic Google AdWords interface? I want to pass some variables returned from a campaign management script to a spreadsheet (...
6
votes
3answers
1k views

Sorting data in Google Spreadsheet by cell entry

I have a Google Spreadsheet that lists various events. Students have entered their name next to events that they would like to sign up for. It looks like this: Each student may sign up for more than ...
3
votes
2answers
3k 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 ...
5
votes
1answer
19k views

Auto create and name new sheet in Google Spreadsheet

How can I automatically create and name new sheets in a google spreadsheet from a list of names, such as a student roll sheet? I would like each new sheet to be created when I add corresponding names ...
6
votes
2answers
7k views

How can I dynamically format the diagonal cells in Google Spreadsheet?

I want all of the diagonal cells (A1, B2, C3, D4, E5, etc) of a Sheet to be formatted as Black Background, White Foreground. Is there any way to do this for a Sheet that constantly increases in size? ...
20
votes
6answers
81k views

How can I automatically set “last updated” cell in row Google Docs Spreadsheets?

How can I automatically set "last updated" cell in row Google Docs Spreadsheets ? I want to create a column where the cells' value will be automatically set to when that row was last amended. Is this ...
6
votes
5answers
25k views

Force users to update password every 3 months for Google apps?

I manage a domain and I want to force all users to change their password every 3 months. Is there a way to do this?
5
votes
1answer
31k views

Google Spreadsheet Timestamp? [duplicate]

I'm looking for some help with my Daily Work Log spreadsheet. I've search and read many different version of making a "TimeStamp" in Google spreadsheet. And it seems I don't have enough experience for ...
5
votes
0answers
512 views

Preserve formatting when referencing cells across sheets [duplicate]

Is there a way to show the formatting of the referenced cells from another sheet in Google Sheets? For example I have a sheet named balance with A1 having a comment and a blue background. When I ...
1
vote
0answers
270 views

Google Docs: Script Project is not editable for anyone

I created a new Script Project in Google Docs with the following sharing settings: "Anyone who has the link can access. No sign-in required." - "Edit access: Allow anyone to edit (no sign-in required)"...
3
votes
3answers
6k views

Parsing timestamp in Google Sheets with script

I have a spreadsheet with a form that timestamps every time the form is submitted. I'm writing a script to change the background color of the timestamped cell if it is more than seven minutes after a ...