Hi,
I am playing around with scripts with the intent to delete a row on my sheet with a user action (click a toggle making a cell go from False to True). Can anyone assist? Thanks in advance for any help!!
Also, I’m curious if my app trigger is right (or if I need one…).
Here’s what I have so far:
(Found this script on the web and edited it for my sheet.)
function onChange(e) {
var s = event.source.getActiveSheet();
var r = event.source.getActiveRange();
//change “main” to the tab sheet name you are using
// getColumn with “Delivered” is currently set to column 4 or D. Change to
//column you are using.
if(s.getName() == “Favorites” && r.getColumn() == 4 && r.getValue() == “TRUE”) {
var row = r.getRow();
s.deleteRow(row);
}
}