3

How to Fix your problem Manually install the onFormSubmit trigger. When installing the Trigger, under "Choose which function to run", choose the function onFormSubmit (the trigger event argument () isn't shown when creating the trigger. There should only be one onformSubmit trigger, and only function executed by the trigger. If you find that the function ...


2

Whenever any text is entered in a cell, you want to convert it to uppercase. But your script applies to all kinds of types (includes dates and numbers) and this has undesirable results. Javascript recognises a variety of types. The reason that your script isn't working as expected is that it applies to all types, rather than only to the "string" type. ...


2

Use on edit / on change triggers and the corresponding event object. Example function onEdit(e){ var a1Notation = e.range.getA1Notation(); e.source.toast(a1Notation + ' was clicked'); } Related How to trigger a script in Google sheets when a value changes References https://developers.google.com/apps-script/guides/sheets https://developers.google....


1

Assume that you have 31 sheets, named 1 to 31 respectively. This script works when the spreadsheet is opened by using a simple onOpen trigger. new Date(): gets today's date now.getDate(); is a shorthand way of getting the day of the month. This is a number ss.getSheetByName(sheetname);: assigns the day number to the sheet name sheet.getRange("A1")....


1

Your script fails because the event object source refers to the Spreadsheet and not the sheet. There are many ways to resolve this particular problem, please consider this answer as just one solution. function onOpen(e) { var sheet = e.source.getActiveSheet(); // get the default sheet when the spreadsheet opens autoSort(sheet); } function autoSort(...


1

You have seven tabs named Sunday-Saturday inclusive. When the spreadsheet opens, you want the the tab for that day of the week to be automatically selected. Your question probably has several solutions. Consider the following answer as just one solution to your question. Note: onOpen is a simple trigger that will automatically execute when the spreadsheet is ...


1

It's very likely that you are running the onformsubmit function from the script editor which don't send an event object (e). In order to run osformsubmit from the Google Apps Editor for debugging purposes, you have to create a an auxiliary function to create the event object and assign the required properties. For a broader explanation see the answer from ...


1

onEdit / onChange triggers aren't triggered by formula result changes, they are only triggered when a user edits the spreadsheet by using the Google Sheets UI. The solution is instead of monitoring for formula results changes look for the cells being edited by the user whom will make the formula results change.


1

When your spreadsheet opens, you want to go automatically to the cell in Column B containing the last line of content. Your script attempts to do this incrementally, however there are a couple of flaws: !range.getValue() tests for no value. This is wrong, it should be range.getValue() return; By including this, you stop the row number from incrementing, ...


Only top voted, non community-wiki answers of a minimum length are eligible