Clear all column's data

One more question is there a way to select a button that would go to a sheet and clear the data from all columns? I realize this could be very dangerous if you make a mistake when setting up you could destroy your sheet. However, once you have the correct sheet selected, I’d like to be able to clear all the data from the answer sheet to make it ready for the next test. Of course, I need to leave the column headings alone; just clear out all the data below.

This would probably require some sort of script set up with an onChange trigger. When you set a value somewhere in your app and it updates the sheet, then the trigger will run and can spin through a sheet you specify and clear out the cells you want in that sheet. Then the script would finally clear out the value that you set to trigger the process.

So I would want something like onChange

select sheet !Tests
select A2:M
perform function Edit menu:Delete values
end selection

Is the right logic (I’ll have to study the syntax)?
I ran a macro to clear the selection to get the syntax.
I guess now I need to figure out how to make it trigger on when a specific string is entered into a specific cell.

Here’s a handful of posts that might help. As far as the trigger, be sure to look for this icon when writing the script. This allows you to set up a trigger. Just make sure it’s an onChange trigger.


1 Like

Is there a better way to clear one full column than with scripts?

This post is 2 years ago which is like a thousand Glide “dog-years” (I think glide adds new features by the hour🤣)
Really need to clear one whole column in one click.

1 Like

I managed to use the Multiple Row Reset Concept App for some ideas.
Definitely does the trick for now. Bit of a workaround but at least i don’t have to use scripting etc.

1 Like