I have a google spreadsheet with multiple sheets.

On one of the sheets, we use Zapier to populate new rows of data when a meeting is scheduled with our team. I'd like the sheet "Meetings" to automatically sort by date, descending in column P (16). The sheet is A:AW.

When a new line is added by Zapier it is not in order by date.

I would like 1 sheet, "Meetings", to be auto-sorted whenever a new row is added.

I'm looking for a script and how to add it to the worksheet that will help auto-sort the sheet by date.

Every time I open the sheet I'd like it to be sorted by column P in descending order.

  • I've found other threads but they don't seem to help with only updating 1 sheet.
    – Matthew D
    Sep 20, 2021 at 13:10
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Sep 20, 2021 at 14:12
  • Does that help. I just need a script to help me automatically sort a sheet by date instead of me having to do that every time I open the sheet.
    – Matthew D
    Sep 21, 2021 at 19:40
  • 1
    Does this answer your question? How can I make some data on a Google Sheets auto-sorting?
    – Tedinoz
    Sep 27, 2021 at 5:21
  • 1
    You need to adapt that script to your scenario. Have a look at Run onEdit script in one sheet only as a way to target a specific sheet. You might also use getDataRange(), rather than trying to define a specific range, it will be more efficient. So far as sorting when you open the spreadsheet, would you please explain why you want this? I'm not familiar with Zapier, but if users are editing "Meetings" then you should probably consider an onChange installable trigger (with a "Change Type" of INSERT_ROW) instead of an onEdit trigger.
    – Tedinoz
    Sep 30, 2021 at 1:24


Your Answer

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