I am looking for a way to automatically create a new row on top of older rows each day.

Inside of this row should be the current date.

  • 1
    Were you able to implement my solution?
    – Jacob Jan
    Sep 1, 2013 at 18:30
  • 1
    Approximately 340 rows were added since you asked this question.....
    – Jacob Jan
    Dec 25, 2014 at 7:40

1 Answer 1


With this little snippet it is possible. Add the code by selecting tools>Script editor in the spreadsheet. Make sure to press the bug button:

enter image description here


// for the active sheet (in essence the first)
function onTop() {
  var ss = SpreadsheetApp.getActiveSheet();
  var date = Utilities.formatDate(new Date(), "GMT+2", "dd/MM/yyyy")

// for a specific sheet
function onTop() {
  var sh = SpreadsheetApp.getActive().getSheetByName("TEST");
  var date = Utilities.formatDate(new Date(), "GMT+2", "dd/MM/yyyy")


In the script editor, choose the following menu option:
enter image description here

and set the trigger as follows (or however you choose): enter image description here


I've created an example file for you: on top


You have to return tomorrow to check it though =)

  • Hi Jacob! How would I modify this script to reference a particular tab? Thanks. :)
    – Drewdavid
    Feb 24, 2017 at 17:10
  • 1
    Hi @Drewdavid, see code I've added.
    – Jacob Jan
    Feb 24, 2017 at 19:12
  • How do I set getRange(x) to below the last updated row? Like I want to update the sheet at the bottom. Nov 23, 2019 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.