Reputation: 1
Should this script be causing an error? I haven't done anything with Apps Script in a long time. My Google Sheet doesn't have any sharing restrictions, and I already tried the fix I saw elsewhere in this forum where you add your script to the Library...
function onEdit(e){
if(e.range.getA1Notation() == 'A2:A' &&
e.range.getSheet().getName() == 'Your feed'
)
e.source.getRange('F2:K75').clear()
}
Every time I try to run the script, I get the "An unknown error has occurred, please try again later" message.
Thanks!
I tried to create a script to clear a range of cell contents when another cell range was modified.
Upvotes: 0
Views: 650
Reputation: 64100
Maybe something like this:
function onEdit(e) {
const sh = e.range.getSheet();
if (e.range.columnStart == 1 && e.range.rowStart > 1 && sh.getName() == 'Your feed') {
sh.getRange('F2:K75').clear()
}
}
Upvotes: 0