Relative Content

Tag Archive for google-sheetsgoogle-apps-scripttriggers

Get Macro to Run Based on Checkbox Trigger [duplicate]

This question already has answers here: Trigger function by checking checkbox (2 answers) Ticking checkbox triggers function to add time stamp (2 answers) Closed 13 hours ago. I am a new Sheets, I have checked other responses on this, but I suck at coding and broke the script each time I did it – it […]

I am trying to insert a timestamp from one spreadsheet to another spreadsheet

I have two spreadsheets, we will call them Active Spreadsheet (where the code is being implemented) and Target Spreadsheet (where the timestamps go) The Active Spreadsheet will have data entered on sheet “Week1” into column D starting at row 4. When the data is entered into column D I want an “Initial Date” timestamp and a “Modified Date” timestamp populated into the Target Spreadsheet, sheet “Week#1” at the corresponding rows in columns 1 and 2 respectively. I have the following code written, and it runs without errors. However, when I input data into column D of the Active Spreadsheet, nothing populates in the Target Spreadsheet. I have tried running the code and researching various reasons as to why it is not working but cannot find a solution.

On edit trigger functionality from a non user

I am using the onEdit trigger quite a bit in my scripts, and I realized that it can only be triggered from a ‘user’ edit. (“An installable edit trigger runs when a user modifies a value in a spreadsheet.”).

How do you turn a command for a single active cell into a command for a range of cells?

so I’m a beginner to Apps Script. I’m currently trying to create a dropdown on Google Sheets so that users can select multiple options from the drop down. The code I currently have is below, and works well for one cell. However, I was wondering if there was a way to expand on it so that it could be applied to an entire column of cells. (visa vi: I don’t have to make a new script for each individual cell I want to use).

I am using Google Appscript to modifying a spreadsheet circumventing cell protections. Could anyone help suggest some reasons it is not working?

The reason I don’t call the second function directly is because I need this function to be called by some users who do not have cell protection permissions. Therefore, K2 is modifiable by everyone, however, the cells that the second function modify aren’t. So far both halves of the functions work. By clicking a button that runs the first function, I can clearly see that cell K2 is changed. Additionally, when I manually modify K2 to be “Wait…”, it also runs the second function. However, for some reason Google Appscript doesn’t count modification through functions to count as an OnEdit() trigger.

Google Sheets time-based trigger just stops firing

This is the 2nd time I’ve had this issue with this one particular spreadsheet.
I have a time based trigger that fires every 15 minutes. 2 days ago it just stopped firing. There are no errors, if I go into the trigger settings nothing is out of the ordinary. It just doesn’t fire anymore.

onEdit() functionality when performing undo operation in sheets

I am developing a basic functionality in my spreadsheet where if data is entered in two cells, a category name and amount, they will populate another part of the spreadsheet and then be cleared from where they were originally entered. This is making use of the event object in appscript that enables one to perform an action if a cell is edited. The problem I am having is there are unfortunate side effects once I have logged the event and performed the action.