# Reset values daily

**URL:** <https://community.glideapps.com/t/reset-values-daily/1457>\
**Category:** Ask for Help\
**Created:** [October 28, 2019, 10:53pm UTC](https://community.glideapps.com/t/reset-values-daily/1457 "2019-10-28T22:53:20Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![George\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/george_b/32/534_2.png) [@George\_B](https://community.glideapps.com/u/George_B)\
**Post date:** [August 11, 2020, 11:19am UTC](https://community.glideapps.com/t/reset-values-daily/1457/22 "2020-08-11T11:19:09Z")

</div>

Google searching is your friend. I did a search on: google script clear a range of data

Here is a link that I found: [https://www.youtube.com/watch?v=LiKF6Vq3P-s](https://www.youtube.com/watch?v=LiKF6Vq3P-s)

Then one on: google script running a function periodically  
This came up at the top of the list: [https://stackoverflow.com/questions/3018875/is-it-possible-to-automate-google-spreadsheets-scripts-e-g-without-an-event-to](https://stackoverflow.com/questions/3018875/is-it-possible-to-automate-google-spreadsheets-scripts-e-g-without-an-event-to)

There are many other hits if neither of these fits what you want to do but as you read through the ones that don’t work you’ll learn so it’s not a loss.

---

<div class="post-metadata">

**Author:** ![Jan\_Rebicek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jan_rebicek/32/6766_2.png) [@Jan\_Rebicek](https://community.glideapps.com/u/Jan_Rebicek)\
**Post date:** [August 11, 2020, 11:22am UTC](https://community.glideapps.com/t/reset-values-daily/1457/24 "2020-08-11T11:22:08Z")

</div>

Thank you!

I found this guide by Google which really helped me: [https://developers.google.com/apps-script/guides/triggers/installable](https://developers.google.com/apps-script/guides/triggers/installable)

Plus (too late) I found your simpler form of writing the clearing function:

```
function clearAFewColumns() {
  var sheet = SpreadsheetApp.getActive().getSheetByName('Sheet2');
  var lastRow = sheet.getLastRow();
  
  // Column E = 5; F = 6   
  sheet.getRange(2, 5, lastRow, 1).clearContent();
  sheet.getRange(2, 6, lastRow, 1).clearContent();
  
}

```

And everything works now, thanks again!

[Previous page](https://community.glideapps.com/t/reset-values-daily/1457.md?page=1)
