How to Stop onEdit Automation in Google Sheets
Learn how to stop onEdit automation in Google Sheets by renaming triggers or commenting out lines of code. This video provides practical tips for managing your Google Sheets scripts effectively.
you're automating or trying to automate your app scripts or you have already automated your appcript and you do not want them automated. Something interesting about appcript is that there are these names of functions that will automatically happen no matter what based on certain actions. So there's onopen that will trigger some kind of function when your spreadsheet is opened on edit whenever you do an edit. And then there's some other ones that probably you might not be using but you could. on selection change, uninstall, do get and do post. These last two are for deployed web apps, so you're probably not using them, but I'm just sharing this with you because these are what is called simple triggers. They will trigger without having to create a you don't have to go over to the left
side, go to triggers. You do not have to add a trigger and choose the function to run. They're going to run automatically. However, if you want to unautomate these or stop this automation, one simple way is to rename them. So this unedit is very specifically o n then capital E then dit. But if you say something like non-edit or do not edit or submit onedit even like just change the text completely then it's no longer the saved triggered simple trigger . Now if you create let's do this on edit. Now if you save this and you do want it to happen
on edit we have to go over to triggers. We have to add trigger . We have to choose a function to run which is going to be let's do this on edit and select event type onedit and click save. We'll have to authorize it if you haven't authorized it yet. And your trigger will show up here as a listed item. And if you want to delete this trigger or unautomate it, go over to the three dots on the far right and click delete trigger . Delete forever. And there it is. It's gone. And it's no longer the onedit simple trigger . So this will not. However, if you do have this onedit and you just want to say not do this one thing, maybe there's a few things going on or a few lines, you can put two slashes in the front of a line and it
will comment it out and it won't run. The other way to do multiple line commenting out is to have a slash and then two asterisks. And you see here the end, it will automatically add an asterisk and a slash. And we can put that any number of places down here. And now all of this is commented out. So even if I add some more script here, it's all commented out. So this is a multi-line comment as opposed to just the two slashes. You're watching Better Sheets here on YouTube. Make sure you check out this video or this video and subscribe right now to get more tips, tricks, how-tos, get more out of your Google Sheets than you ever have before. I'm excited to be making a ton more videos here. Ask me questions down in
the comments and I will answer them in future videos. But for right now, right here, one of these videos is going to be your next Google Sheet.