Questions tagged [google-apps-script]

For questions about using Google Apps Script to extend Google applications

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

Target range coordinates exceed sheet dimensions

starting new thread on new problem I encountered. I have a code below which is intended to copy a range of cells into last empty row on another tab in a sheet. When running I got an error saying ...
  • 23
0 votes
1 answer
561 views

Copy variable Range (fixed number of columns, flexible number of rows based off cell value) to last row of another tab in the same sheet

I'm new to google script. I need to get a flexible range copied from one tab in a sheet to last empty row in another sheet. Flexible Range is made up from fixed amount of columns (25) and changing ...
  • 23
1 vote
1 answer
392 views

How to make the specific dropdown list reset to the specific choice daily?

Here is the basic layout of what I need. https://docs.google.com/spreadsheets/d/1t2FlKs3TTVsGp3co6SkFlfCb3EPDWv-i6g9su4o_flQ/edit#gid=1850242391 It's a daily check-in document that people come to ...
  • 11
1 vote
1 answer
25 views

How to set C1=D1 then clear D1 Google Sheets using App Script

I'm currently working on a Google Sheet and want to be able to set the value of cell C1 to be the value of cell D1, and then clear cell D1 afterward. My issue is that once I clear cell D1, cell C1 is ...
  • 11
1 vote
1 answer
105 views

Copy variable Range (based off cell value) to another tab

I'm struggling to set variable range to be copied into another tab in the same sheet. Fixed table range is defined as "Sprzedaż template!B84:Z95". Actually I would like to have that range ...
  • 23
-1 votes
1 answer
134 views

Schedule a script to run at midnight to append current date to sheet

How can I implement a script that each day at midnight will add a row to a sheets document, with the current date in it, below whatever the bottom cell is that is full?
0 votes
1 answer
23 views

Copying Values immediately based on other cell Values

I am collecting data from Google Form into a Google Sheet, in a Form Responses Sheet it has a column R that cell value changes (as the form responses can be editable), and the values can be Pending, ...
0 votes
0 answers
25 views

How to start a new project in GAS linked to a Google Sheets when the first project already exists?

I need two different projects but linked to the same Google Sheets. So for that I used to create the first project just by clicking on Extensions > Apps Script on Google Sheets and then on Legacy ...
1 vote
1 answer
69 views

Custom trigger to update values in a column from a formula

I have created a Google Sheet to store, edit and upload items I am selling on eBay. Originally I thought of using a calculator to calculate a selling price (Column O Sheet1). I found this link on ...
0 votes
1 answer
124 views

Automatically Color Series In Chart

I am trying to make a graph that is essentially a timeline of a few different activities, all of which can be repeated. The only way I've come up with to do this so far is to have each "instance&...
  • 231
0 votes
1 answer
18 views

Copy 4 cells from one tab into different columns in another tab based on a 5th matching cell without deleting all the other data

I am very new to coding and I am more familiar with python than javascript. I am able to copy the cells to the other tab but it deletes all the other values in those columns. How can I do it where it ...
0 votes
1 answer
31 views

Help adding checkbox to google sheets

I am a novice to google app scripts. However I need to copy selected rows (with a checkbox) to a second sheet. I am using this code below. However it copies the entire source sheet. I only need rows ...
1 vote
2 answers
47 views

Prevent Google spreadsheet editor from accessing GAS by using detached GAS

The solution is sketched in this post, but it seems key steps are not identified. This code works fine if in GAS bound to the spreadsheet: function onEdit(e) { var sheet = e.source....
0 votes
1 answer
283 views

Cannot read property '0' of undefined at onFormSubmit

I have created a Google Apps script from a Google Sheet. Data is submitted to the sheet via a form. I had onFormSubmit(e) working fine and sending a custom email to the form respondent. But now it's ...
0 votes
1 answer
216 views

Set value if condition is met

I'm trying to create a script which will do the following: Check if the number in col. B for each row is > 4 If it is: send an email & mark the associated cell in col. C as "Yes" e....
  • 1
0 votes
1 answer
51 views

Why does my onEdit macro error when checking on an edit in a specific cell and sheet?

I've been battling with this for several days and used many previous answers found on these site, as well as a few others, but still can't get my script to run as intended. I have a dropdown box on ...
  • 11
0 votes
0 answers
131 views

Auto create new sheet when new data in column?

I'm trying to create a new sheet on google sheets whenever column B gets a new value. This sheet will be named the value that created it. . I also want to have a function in the new sheet that ...
1 vote
1 answer
170 views

How to transpose (rotate) entire Google Sheets sheet?

My sheet is 123 rows and 93 columns and is very complicated: there are lots of grouped/hidden rows, grouped/hidden columns, notes in cells, comments in cells, complex formulas (including ones that are ...
  • 672
0 votes
1 answer
45 views

if and for statements on Google Sheets with multiple tabs

I am trying to figure out how to send an email to a bunch of people on my mailing list, but with it being individualized for each person. I have their names and email addresses on one Google Sheet (...
0 votes
1 answer
27 views

I need to perform the same function for each row in my spreadsheet. I have 30 rows in total

I am attempting to calculate and store the number of days absent for my employees - I can do it for one row (employee) but I have thirty employees: function updateDaysAbsent() { var ss = ...
  • 1
0 votes
1 answer
106 views

How to get a notification when a column in google spreedsheets changes

I need help with a code. I need to get a notification on my email or Slack when for example, column D changes. But I would love to received what column changed. Here is what I got right now. function ...
0 votes
0 answers
46 views

Google Sheets - Autosort Script issues

I am trying to sort data descending based upon column B (2) which has different numbers in each cell. EG: B8 = 99, B14 = 70, etc. I'm intending for it to autosort and do it onEdit. I'm not good at ...
  • 1
0 votes
1 answer
348 views

Hiding columns based on date

Pretty new to scripts. I have a sheet with name information in columns A-C and dates from column D on. I found a script that will hide all columns to the left of the column with the current date. I ...
  • 3
0 votes
0 answers
148 views

Create a pop up window script for Google Sheets as a password

I have created a sign in/out sheet for students within my building. Students will type their name in column A, click a checkbox as a timestamp when leaving and entering and a dropdown for where they ...
  • 11
0 votes
1 answer
219 views

Need a Unique ID to be populated in Google sheets on Google Form submission

Looking for a dynamic unique ID for Google Forms, to populate into Google Sheets Response form. I don't want to use external addons. Below is a code I found online but can't get it to work - I'm a ...
0 votes
0 answers
50 views

Sheets: Collaborators inserting their names as values into selected cells

Previous post marked closed due to being unfocused, so I pared it down. Not sure if this is now good enough, if not please can someone comment to explain so I can correct it? I'm trying to find a way ...
  • 1
0 votes
1 answer
100 views

Google sheets -How to modify a number in a formula based on user input

I was trying to automate a project where I would need to modify a number in one of the formula every time as per the user input. For example: in the above formula, the highlighted number (9) should ...
0 votes
1 answer
23 views

add timestamp to this code

How do I add a timestamp in the format hh:mm:ss in column B (instead of "null") const values = [[new Date(), null, text]]; const firstBlankCell = sheet.getRange(sheet.getLastRow() + 1, 1)...
0 votes
0 answers
10 views

Dynamically add answers [duplicate]

I want to ask questions as the following with Google Forms: What lessons have you already completed? (here I give a list of lesson options. Only one option can be selected) Lesson A Lesson B Lesson C ...
-1 votes
2 answers
345 views

Google Sheets – Is there a Full Screen Function or Script?

I was wondering if there is a function that makes google sheets go full screen? For example a script that can be added to picture, that when clicked makes google sheets go full screen? Or upon opening ...
0 votes
2 answers
366 views

TypeError: Sheet.getMaxColumns is not a function. What do I need to do>

I had some code created using the classic editor that did the job of inserting 10 lines in two Google Sheets, which grow down over time with record building. The code speeded things up for the users. ...
1 vote
1 answer
2k views

Choose format for new Date() in Google Apps Script

I have tried almost all suggestions on the internet, yet nothing seems to work. Maybe someone can help a newbie out. I am using this at the end of my script: sheet.appendRow([new Date(), null, text]); ...
3 votes
1 answer
131 views

Formula for matrix (dates in descending order)

As a sequel to this question Formula for matrix (dates in ascending order) how would the formula (=IF($B2="Apple",A2-SORT(FILTER(A:A,B:B="Pear", A:A<$A2),1,FALSE),"") ...
  • 199
3 votes
2 answers
142 views

Formula for matrix (dates in ascending order)

Firstly, apologies for this question but I couldn't really wrap my head on how to do this (ultimate aim is to put it in app scripts) Let's say I have a table that is updated daily showing the fruit ...
  • 199
2 votes
2 answers
56 views

Is setting a trigger for a function to run with a triggered function not allowed?

I would like my function freezeSunday to run at exactly at 1pm on Sunday. Since it does not appear that you can trigger a function to run at a precise time (only at a randomly selected time within a ...
0 votes
0 answers
30 views

Insert Dropdown (Cell Range) from Google Sheets into Google Doc

I'm using Google Docs to collect a lot of information about property. Each property has its own Doc file. In this Doc, I have various Dropdown lists. I'm at the point where I need to update and add ...
  • 101
2 votes
1 answer
115 views

"Copy to" confusion

In my spread sheet, there are 3 tabs, let's call them A,B and C. Tab A has user input data Tab B picks up that data (get.range and set.formula) and time stamps it (daily interval) with rows appended (...
  • 199
1 vote
1 answer
283 views

AppScript: Compare a cell Value pre & post update to populate another cell

Newbie to scripts. Link to the sheet with minimal essential information In the status tab, there would be an inventory of equipment (currently only one (A1). The equipment can be in various states (...
  • 199
3 votes
1 answer
539 views

Running onEdit script only in certain sheet

I'm having an issue with one of my scripts created from a macro. I want to update a filter onEdit but only when a certain sheet ("Invoice") is open. Here's what I have now that works across ...
  • 31
2 votes
2 answers
2k views

Scheduling a script to run at a specific time rather than a range of time

I set a time-driven trigger to run my script, but the only choices in the pull-down menu for this are 1 hour ranges, 1-2pm, 2-3pm, etc. I chose 1-2pm, and one day the macro ran at 1:38pm and another ...
0 votes
1 answer
228 views

How do I forward an email, including the original forwarded message and sender email in Gmail

I am trying to figure out how we can forward the original message and include the recipient email, full chain, so for example: ---------- Forwarded message --------- From: Ram Sam <test@example....
0 votes
1 answer
179 views

I need to update the app script to also capture Gmail attachments' name along with other details

First of all, I am not familiar with coding. I have a code that I use to pull certain information from Gmail based on the labels. Now the problem is, the code does not include a line to have the name ...
  • 1
-1 votes
1 answer
106 views

Is there a way to use URLFetchApp to behave like importData for CSV rresults

For various reasons (see question Force the refresh of a Google Sheet) I am trying to replace the use of importData in an app script with a custom function that leverages UrlFetchApp.fetch() retrieve ...
0 votes
3 answers
4k views

Force the refresh of a Google Sheet

I know that there have been several attempts to answer this type of question that I've found through google searches, but none have worked for me, so I thought I'd ask again. I have a Google Sheet ...
0 votes
1 answer
126 views

IMPORTRANGE keeps broken

I have several raw data files which I have linked with importrange to another files. For some reason my files where getting broken since I keep getting importrange internal error. Also, they take too ...
  • 1
-1 votes
1 answer
78 views

Assigning custom Key Combos w/ Google Sheets [duplicate]

I am trying to assist in moving over to Google Sheets from Excel. The one concern is that we currently have some users who are affluent in Excel and are concerned that their macros where they assign ...
  • 1
0 votes
1 answer
18 views

How to make column go reversibly blank with custom validation and conditional format rules

I was able to use scripts editor to make some conditional formatting. Would like the option of covering up the answer column, column B reversibly. Would love some help with a script or how to do this. ...
0 votes
1 answer
1k views

Exception: Service Spreadsheets failed while accessing document with id

I've been using this script for the last two years but it stopped working two months ago with the mention : failed while accessing document with id, is there something that changed with Google? ...
  • 1
0 votes
2 answers
43 views

How to transpose one tab of data into another tab?

I'm looking for guidance on how to set up my Apps Script file to transpose data from one tab to another. A sample file of my data can be found here. I currently have 10 columns in the rawData tab: [...
0 votes
0 answers
20 views

Import coefficients and compare

I have a basic file where I have several parameters (on the left). For each parameter, I have one or more A and B coefficients. In my second file, I have the same thing: parameters (not necessarily ...

1 2
3
4 5
36