The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [google-apps-script]

For questions about using Google Apps Script to extend Google applications

354 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
5k views

Set title of currently selected chart from named cell

There's a sample over here that will show how to set the first's chart title to the active cell: function onOpen(){ SpreadsheetApp.getUi().createMenu('Charts').addItem('Update title of the first ...
4
votes
1answer
306 views

Odd Google Apps Script behavior

I have a Google Apps Script project that I have used for the past few months (successfully) and everything has worked just fine. A few weeks ago, I started getting the "Unable to load files" error ...
4
votes
1answer
1k views

Programmatically create an internal hyperlink

I need to programmatically create a large number of links in a Google Sheets that point to a specific range in another sheet of the same document. I tried to use named ranges for that but for the ...
4
votes
1answer
2k views

Copy range from specific values to top of another sheet

I want to copy everything from the range "Start" to "End" to the top row of another sheet (Sheet2). Sheet1: The data between "Start" to "End" can be any number of rows. This is my current code. It ...
4
votes
1answer
1k views

How can I create a Google Spreadsheets whose name and cells auto-complete with cells completed on another sheet?

I'm using Google Spreadsheets to manage projects, and I'm not familiar with scripts or macros. What is: 1) I have a Gantt spreadsheet which lists all the ongoing and foreseen project as follows (by ...
3
votes
1answer
40 views

Reference formulas from one sheet into multiple sheets

I would like to reference (pull in) formulas (not the result of the formula) from one sheet into multiple sheets so that they calculate on the sheet they are referenced. For example, if I have =...
3
votes
1answer
72 views

How to automatically convert all Microsoft Office file attachments in Gmail to Google Docs?

My Gmail has thousands of emails. Each email will have several attachments as Microsoft Office files (.doc, .docx, .xls, .xlsx, .ppt, .pptx). Currently, I want to automatically convert all Microsoft ...
3
votes
1answer
986 views

Jump to bottom of spreadsheet, blank (non-formula) row

I had a tall spreadsheet that I need to add data at every time it opens. Answers like Go to Bottom Cell have been helpful, but my quirk is that the first column contains formulas that return blank in ...
3
votes
1answer
728 views

Simultaneously sort multiple ranges on a single sheet in varying orders

I am trying to find a way using a script if possible (or formula) that will allow me to reduce the number of operations that I have perform to sort data in a particular google spreadsheet. Currently, ...
3
votes
1answer
986 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 ...
3
votes
2answers
858 views

How to Modify Matched Cells Across Multiple Sheets with Google Script

My question is a fairly complex one, but I'll do my best to clarify exactly what I'd like to do and this requires some background: I have a Google Spreadsheet used for user administration in my ...
2
votes
1answer
38 views

Timestamping purchase entries

I’ve created myself a budget tracker where I can track what I bought and how much I spent across a few categories. I specified column B (purchase entries are rows) to be the date and time at which I ...
2
votes
0answers
919 views

Change tab color based on cell value that is a formula OR cell background color

1st time question asker, so I'm apologizing in advance if my question is worded wrong or doesn't make sense or is, frankly, to wordy (I tend to over explain). I have a sheet with, currently, 10 tabs. ...
2
votes
0answers
203 views

How to pass a parameter allow= “geolocation” when embedding Google Apps Script in a Google site?

The target is to embed a Google Apps Script gadget into my Google site. The function of this script is to show a google map, determin the location of the client and center the map to the found ...
2
votes
1answer
260 views

Add a new row to a spreadsheet, copying down formulas when a certain cell reaches a particular value

I've got a simple Google Sheet (it's literally one line), that has in A2 =now() to calculate the current time, and then a series of formulas calculating various dates/times based on the current date ...
2
votes
1answer
33 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 ...
2
votes
1answer
2k views

Script to copy values only

I have a script which copies new form data from one sheet to another. However, I only want the values and not the formatting to paste. Here is the script: function onFormSubmit() { // moves a ...
2
votes
1answer
409 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-check-in. There's standard form. I'd like the results for each ...
2
votes
1answer
85 views

Make function only work on first sheet, not in whole Google Sheets file

I have the following code which is for tracking the date of any edit made in a particular row. However, this code applies to the whole spreadsheet file, I would like to change this to be for the 1st ...
2
votes
1answer
442 views

Change function from running only on Active Sheet to run on All Sheets (tabs)

I have a script (from here) that changes tab name based on cell value. This works great on the active sheet but I would like it to check and change all tabs based on cell B2 of each tab. function ...
2
votes
1answer
892 views

Put the timestamp of last edit on master sheet, next to edited sheet's name

I'm trying to come up with a script that will print a timestamp of the last edit made to a specific tab within a google sheet. Imagine you have 17 retail stores, each one having its own tab with a set ...
2
votes
1answer
586 views

Any way to separately Validate and create a Dropdowns in Google Sheets?

Sample Scenario: Sheet 1 has a 3 Dropdowns from sheet 2 Sheet 2 has two lists, {"A";"B"}, and a second dynamic list that copies the first IF the value doesn't already appear on sheet 1 The behaviour ...
2
votes
1answer
3k views

Copy data validation rules with relative references using a script

I'm looking for a way to copy my data validation the following way. If validation for Main sheet A1 is: Cell Range: MainSheet!J1 List from range: ListValues!1:1 I need validation for main sheet A2 ...
2
votes
1answer
415 views

How to export (in JSON) a filtered view?

I use Google Spreadsheets as a "web service" to generate a JSON having the information to display in my website. It is OK to export a JSON file: var url = 'spreadsheets.//list/1gRIVkL117xxG8m9nQRa--...
2
votes
1answer
1k views

Reference Cells in Sorted Filter View

I have a Google Sheet that looks like this: That Google Sheet has some Google Script that looks like Google This: function myFunction() { var ss = SpreadsheetApp.getActiveSheet(); var rng = ss....
2
votes
1answer
899 views

Email notification if cell value goes below set amount

I'm having trouble finding a Google sheet script that does what I need so I figured I would ask if someone could help me. Basically I have a simple sheet setup to track inventory of one item. There is ...
2
votes
1answer
99 views

How to automatically create a templated Google sheet?

I'm trying to figure out how to automatically create a templated Google sheets worksheet when a new entry is made in a different sheet. So the flow would be: Person's name is added into Google sheet ...
2
votes
0answers
3k views

Google sheets query returns “loading…”

I've put together a web application that relies on a series of Google components. Google Forms collects data from users Google sheets saves the data (automatically) Additional "calculated" columns ...
2
votes
1answer
145 views

Automatically create a calendar document using Google Drive and Google Apps Script

Is it possible to use Google Apps Script to 'automatically' create a calendar document in Google Drive with the following document features. Traditional calendar table Accurate month and year ...
2
votes
1answer
412 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
568 views

Is there a script to stamp & password protect a PDF on Google Drive?

I have a few PDFs on a Google Drive, I would like to watermark/stamp & password protect (to disallow editing) before I share them. Is there a solution using Google App Scripts?
2
votes
1answer
2k views

Reference a Google Spreadsheet Row containing specific Text within Google App Script for spreadsheets

I am having trouble finding a function that can reference a row (the number of that row) containing specific text as criteria. I thought that VLookUp would work, but it's not really. Ideally it's ...
1
vote
0answers
10 views

IMPORTRANGE, where range shifts often, to different spreadsheet

What I have: a client information spreadsheet that contains company information including their last order date following the status of their account (active/follow-up). What I need: the last order ...
1
vote
0answers
31 views

Insert image to spreadsheet from google drive folder, png image dose not show, why?

I have an image in a folder that I want to import into my spreadsheet (in a cell). I'm using the script from Insert image from Google Drive into Google Sheets (with some modifications). But this ...
1
vote
1answer
26 views

Automating Find & Replace to change font colour

I write about the card game bridge, so I need to automate this formatting all the time: Find all "♣" and color the text green (#00b700). Find all "♦" and color the text orange (#ff8100). Find all "♥" ...
1
vote
1answer
43 views

Writing a macro to create a new tab and name that tab based on a cell value in Google Sheets

I would like to have a Macro that generates a new tab and names that tab based on a cell value. There is a tab called 'Dashboard'! on which the user enters information in assigned cells. Afterwards, ...
1
vote
0answers
51 views

Split rows by comma into multiple rows and divide between splits

I have a Google Sheets spreadsheet (sheet 1) which I use as source for a function to split a row into several rows in a results worksheet (sheet 2). The split function divides the row when it finds ...
1
vote
0answers
23 views

Google sheets script add data in next column

I'm trying to modify a script to create a PageSpeed report that pulls in certain KPI's from Google Pagespeed API. Once the data is received, i want it to place those KPI's next to the URL and so forth....
1
vote
0answers
12 views

Creating auto-updating indexed links to tab in spreadsheet

This spreadsheet is a lesson planner for teachers. It will be used by a wide variety of teachers with varying tech skills so it needs to be straightforward and not easily messed up. The first sheet ...
1
vote
0answers
23 views

Numbered list with Cyrillic letters

In Google Docs, I would like to have a numbered list using Cyrillic letters, such as: а б в г д The regular choices for numbered lists offer the options of Arabic numerals, Latin lowercase,...
1
vote
0answers
20 views

How can I send an email, with an attachment from the user's local storage, using Google Sheets Script?

I'm new to Google Script but quite experienced in Excel VBA. I'm trying to set up a Google Sheet to enable sending of a given document by email attachment to a number of recipients. I've got the email ...
1
vote
1answer
189 views

How do I get Google forms edit url to work

I want to generate an edit url link in the google sheet for a google form which is linked to it. There are already instructions on how to do it. However they do not work for me. I have followed the ...
1
vote
0answers
27 views

Change button image on click

Is there a way I can change a button image on click? At the moment I am using circles over an image which I am switching between red and green. is there a way I can automate these into buttons that ...
1
vote
2answers
286 views

How do you get current date to be added to a cell when a check box is checked in another cell

I want to get the current date added into a cell when a tick box is checked in another cell. I currently have another formula in the date cell which changes its colour when the tick box is checked, ...
1
vote
0answers
123 views

How do I circumvent protected sheets to expand or collapse groups and rows in Google Sheets?

A budget I am working on has each month on the same sheet and I would like to control which months are visible when comparing expenditure and income. In order to do so, I grouped the rows and columns ...
1
vote
1answer
69 views

How can I disable the authorization needed to open Google Sheets Macros?

Whenever I try to open any macro enabled sheets it requires authorization, even though it's a first party application. Is there any way to stop Sheets from asking it or give permissions to everyone I ...
1
vote
1answer
146 views

Jump to today's date + offset 10 rows

New to scripting. Have a planner in Google sheets which is displayed on a monitor in the office. I have a script to make it jump to today's date on open (found here). The planner is organized with ...
1
vote
1answer
234 views

Google Forms sending me duplicate email on automatical email

So, I've used this code, just reworked for my needs: Can Google Forms send emails automatically? The problem I have is that the account that sends those emails also receives them. Is there a way to ...
1
vote
1answer
153 views

Run a Script When Tab Programmatically added to a Google Spreadsheet

I'm trying to pull data from an Adwords report to a Google Sheet through an Adwords script. This will be done on a daily basis. Every time the Adwords script runs, a new tab is created (and an old one ...
1
vote
2answers
161 views

What function can I use to conditionally format text depending on cursor position or active cell?

In Google Sheets, I have a 'Freeze' on Column A. I want the text in Column A, Row X to Conditionally Format as BOLD RED, while my cursor is on any cell for Row X. Is there a way to manage that?