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

Filter by
Sorted by
Tagged with
0
votes
1answer
77 views

Auto hide row based on cell text (formula based)

My plan is to hide an entire row if a specific cell in the row showed specific value. I already found the script and the script work amazing. But the problem now, since the script use onEdit function, ...
0
votes
3answers
39 views

Else statement is executing when TRUE

I am completely new to coding. I am a teacher and trying to design a lesson planner tool using Google Sheets Scripts. The idea is to have a template sheet for the lesson that will copy into a new tab. ...
0
votes
0answers
68 views

How do I send an email on a Google Sheet when certain cells change using the Apps Script?

I created a script to send email on Google Sheet with the following conditions: When the Assign Email column is filled in and the Status column changes to In Progress, then the notification will ...
0
votes
1answer
24 views

Auto-jump on today's date upon upening the spreadsheet [duplicate]

I use a spreadsheet with a date in a row per column. I would like to have the sheet open on the current date when opening. How can I make this?
0
votes
0answers
21 views

How to read * .tsv files from a local drive into a spreadsheet file using Apps Script?

I have a *.tsv file in local storage on my computer. I want the file to be read from the apps script then the contents of the file are copied into a spreadsheet file. I do not want the file to be ...
0
votes
1answer
20 views

Script sometimes it works sometimes it dosent

I have 2 columns to enter Lat and Long coordinates in ( E and F ), those also contain the Formulas (for all rows, I just happened to choose row 768below) =IFERROR("N"&left(index(Split(D768,"N"),1)...
1
vote
2answers
64 views

Sorting columns with script instead of macro

I currently use a macro script to filter my sheet upon opening the sheet by column A, and I wondered if there was a more efficient/simple way to do it with scripts? function Sort() { var ...
0
votes
1answer
91 views

How to get correct TimeZone in googlesheet using script?

I have wrote following script in my google sheet hoping to convert a timestamp in GMT to a customized timezone. function myFunctions(datetimeString,timeZone,format) { var moment = new Date(...
0
votes
2answers
44 views

Auto Create New Google Sheet With Column Headers Based on List of Names

I'm trying to create a VERY basic CRM tool. I want to create a running list of customer names. Once I enter a name in Column A I'd like a new Sheet automatically created with pre-set columns I can ...
0
votes
1answer
242 views

App Script to move a row of data from one Google sheet to a different one (different sheet id's) based on a cell entry

I'm currently trying to adjust a script I found that copies the contents of a row from one tab of a google sheet, pastes it into the next descending empty row in a different tab and then deletes the ...
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
3answers
75 views

Using a script to only take only take cells with values in google sheets

tl;dr how can I make the script take an entire column (eg A:A) and then ignore the first (header) row, and any blank rows? Background I have an array in Google Sheets with date-ordered data (note ...
0
votes
0answers
160 views

How to copy cell to clipboard

I have a hyperlink on every row (in multiple worksheets) that I would like to, when clicked, copy the info from column 9 of the same row to the clipboard before opening the link so that it can then be ...
0
votes
1answer
35 views

Put Date in Specific Column

I found the following code in another post here to add a date after an edit but it places it in an offset column, I would like the date in Column 8 if column 3 or 4 has been edited. What do I change? ...
0
votes
1answer
74 views

How to timestamp on new added cells in LIVE google spreadsheet?

The code below insert timestamp in google sheet by editing another column. However, there an issue which I have no idea how to solve. When I add new row manually, it successfully adds timestamp, BUT ...
0
votes
0answers
39 views

Hide columns with certain dates

I would like to have a google sheet as a presence list. In the first 3 colums there will be person names, in the first rows the dates of the events. I would like to hide on open all columns (exept ...
0
votes
0answers
9 views

onEdit function does not perform below functions

I've got problems with my GAS below: The problem is, that sendSms() function does not work after editing sheet. //Datownik function onEdit(e){ var ss = SpreadsheetApp.getActiveSpreadsheet(); ...
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 ...
0
votes
2answers
79 views

Using NumberRangeFilterBuilder for a slider controlled variable input?

I've been looking for a slider control in sheets where I can play with a variable input by moving the slider left or right. Within the following example: A1 = Value | B1 = VAR | C1 = A1*B1 I want ...
0
votes
1answer
58 views

Google Sheets onEdit - Run Two Scripts

I'm trying to run two scripts in one sheet - Only the last one runs though - I'm sure I'm missing something small but any ideas? function onEdit(e) { moveRowsFromSheetToSheet_(e); ...
0
votes
1answer
140 views

Script to Duplicate Template Tab Multiple Times and Rename Tabs from Cell Range?

Basically, I have a list of 200 people's names in the range 'Names'!A1:A200. I have another tab named Template. I need a script to duplicate Template 200 times and rename each of the tabs to the name ...
0
votes
1answer
69 views

OnEdit won't apply to all tabs in Google Sheets

I am running a script that automatically organizes priority in a to-do list. It works great on the current tab, but when moved to a sheet within the worksheet the same OnEdit function will not run. ...
0
votes
1answer
97 views

How to automatically set date in a cell when a different cell value is changed by a formula from data on another sheet?

I currently have a column, e.g. ColB, containing SUMIF functions with its data range from other sheets and a column, e.g. ColC, with dates that I want to automatically update to the last date ColB's ...
0
votes
1answer
43 views

Multiplying a cell value on edit

I am trying to make a functionality that allows me to enter a value into a cell and have that value automatically be multiplied by another cell, overwriting the original entry. For example, if Cell ...
0
votes
1answer
18 views

Email non-empty cells in tabular format

I'm trying to trigger an email to send all data on a sheet in columns B:F. I've found this tutorial quite helpful but can't quite get my head round it. /** * Sends emails with data from the current ...
0
votes
2answers
426 views

Cannot Find Function 'getRange' in Google Script

I'm working on setting up a series of scripts for a google sheet where I want to be able to auto sort based off of when something gets entered into the third column, sorting first by the first column (...
0
votes
1answer
195 views

Delete blank rows from many spreadsheet files and ignore files that don't have blank rows

I created a script to delete blank rows from many spreadsheet files. The script I created like this (Version 1) : function delRow(id, name, startBlankRow, countBlankRow){ SpreadsheetApp.openById(...
1
vote
1answer
47 views

ArrayFormula stops working after shuffling rows

I have a pretty extensive sheet wherein many columns I use an array formula to automatically fill data in from various other spreadsheets. The problem I have is when I need to rearrange rows then what ...
0
votes
0answers
16 views

How to keep “HH:mm:ss” as “HH:mm:ss” when archiving to new sheet

I am trying to script a function that pastes values into a new google spread sheet, one of the rows is a time in CST and in the archive sheet gets pasted as "12/30/1899" with the regular time. e.g 11:...
0
votes
0answers
22 views

Google Sheets - pull static value from cell that will change later

I have a sheet where I calculate the average of the daily value for the past 30 days with a rolling average. I'd like to be able to pull the daily values and store them in another sheet. I want to ...
0
votes
0answers
32 views

How can I add in a date macro to a Google doc?

Really grateful for this answer from Thomas Wiersema, but am keen to find out what the issues might be if the Utilities menu isn't showing up after you've followed his instructions via Google scripts. ...
0
votes
1answer
82 views

Displays data arrays with appendrow where other columns contain data

I wrote a script to display a list of names and folder IDs. The script that I wrote like this: function listFolders() { var sheet = SpreadsheetApp.getActiveSheet(); sheet.getRange('A2:B').clear();...
0
votes
0answers
14 views

Trying to figure out a Google Script

Looking for help on a script. To pull new rows from one sheet to update my report without duplicates or erasing manually made changes to current rows. I was originally using =ARRAY_CONSTRAINT() at the ...
0
votes
1answer
63 views

Script to copy range transposed to another sheet

I need to copy a range from the sheet 'Source' to the sheet 'Database' but transposed. It should be the range B1:T9, not the whole sheet. I need to do it with a script as it is going to be a database ...
0
votes
1answer
15 views

Show each n-th column, hide others in Google Sheets

I have several big tables, and I know that each 4th column is interesting for me, i.e B,F,J,N, etc (The total number of columns is different in different documents) Is there an easy way (some sort of ...
1
vote
1answer
100 views

How to go to the first blank cell directly in a column of Google Sheets?

I use column A mainly. A1 is the name of data type, and A2, A3, A4, ... are data. When I open this file, It shows the screen containing the first cell, A1. If I fill data from A2 to A250, then I ...
0
votes
2answers
148 views

inputBox in onEdit does not work for users

I have a strange problem... Simple function like: function onEdit() { var ss = SpreadsheetApp.getActiveSpreadsheet() var sheet = ss.getActiveSheet() var ui = SpreadsheetApp.getUi() var response = ...
1
vote
1answer
67 views

Copy Contents of Cell When Checkbox is Checked - Google Scripts

Preamble: never used javascript before, but trying to learn through google sheets since I work with tons of data. Hello, I'm attempting to write a google script that will take the contents of a cell ...
0
votes
1answer
29 views

Create named Versions of Google Sheets (or other documents) automatically on a schedule

I'm trying to create named versions of a file on a schedule, say once per week. Refer here for an example. The named version should be something like the file name + date so that it can be ...
0
votes
1answer
27 views

dynamic borders for columns

I have this script that sets borders for range if first cell is not empty function borders() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheetmon = ss.getActiveSheet() var rows = ...
1
vote
1answer
35 views

How to do permutation of characters and print it horizontally along that row in Google Sheets?

I am stuck here in printing permutation of two or more characters horizontally along that row in which the characters are. Is it possible? Because I searched it all over and only found vertical ...
-1
votes
1answer
16 views

How to display a text after a choice is selected in google form?

So I have my drop down connected to spreadsheet. There are two column which is ID and Name. In my google form, I want the user to select the ID but not the name. The name should be shown according to ...
0
votes
2answers
22 views

optimize onEdit managing set of many checkboxes

I have onEdit script that hides or shows rows by checking/unchecking checkboxes (yes/no values). Looks like this if(orpscscchbx.getValue() == 'no') { var rowsHided = 0; for (var i = 0; i ...
0
votes
0answers
9 views

Is there a way to link to highlighted sections in a Google Doc?

I have a large document that has multiple highlighted sections. The highlights are color-coded such that all blue highlights belong to one topic, while green highlights belong to another topic, etc. I ...
0
votes
2answers
36 views

Is there a way to protect/copy only some formatting in Google Sheets?

I have a spreadsheet that I use to track customer orders. It has the customer details on a row, their order number and a line of check boxes for the items that they want for that particular order. For ...
1
vote
1answer
32 views

Set link in email body

I have script that sends an email from google sheet and want to have link in the email's body but code like var html_link = "google.com"; var body = "<a href=" + html_link + ">Google</a>"...
0
votes
0answers
18 views

Set boders to a range if first cell in row is not empty

I need to set borders to a range in row if first cell in this row is not empty. I have this code function onEdit() { var ss = SpreadsheetApp.getActiveSpreadsheet (); var sheetmon = ss....
0
votes
1answer
107 views

Why don't work function onEdit(e) when using Zapier

I created a chatbot that using Zapier (through Webhook and JSON) for sending to my Google Sheet a name and a phone of user and Apps Script must generate a coupon code automatically. I used function ...
0
votes
1answer
26 views

High performance Google Apps Script version? [closed]

I am planning a Web app tightly integrated with the Google platform. Calendar, Drive, Docs, you name it. My only concern is GAS processing time, as it is well known that script execution is slow. ...
0
votes
1answer
37 views

Transfer a row to another sheet then clear the original row

I saw this problem and the answer was perfect except that I do not want to delete the row. I only need the cells cleared of existing values. How to move a row into another sheet?