Script to sort sheets by date - how to manage variable location of range to sort

65 views
Skip to first unread message

Loveday Lemon

unread,
Aug 25, 2022, 1:38:48 PM8/25/22
to Google Apps Script Community
Hi all, by adapting a script I found online I managed to get a script that sorts a sheet by date. See example here, I have added a menu called "Sort Card". I have 4 questions about this.

1/ Is there a way to have a menu with only 1 level, i.e. just "Sort Card" without a submenu?

2/ Some of my cards have the data starting lower, underneath a picture. See examples here and here. They don't all start at the same row.  How can I adapt the script so that it starts sorting below the header line?

3/ I need this script for 1000 cards that I have already created. Do I need to add it to each card manually one by one? (in my example I have only 3 cards but  in another folder I have over 1000)

4/ Is it possible to write a script that would take all cards in the folder and sort them by date from the header row?

Thanks in advance for any pointers, I appreciate all the help very much!


Edward Ulle

unread,
Aug 25, 2022, 6:19:40 PM8/25/22
to Google Apps Script Community
When you say 1000 cards, do you mean 1000 seperate spreadsheets?  Why not have them as seperate sheets in one spreadsheet, otherwise you have to have the script in each file.

Loveday Lemon

unread,
Aug 26, 2022, 2:58:33 AM8/26/22
to Google Apps Script Community

Hello, yes I mean separate spreadsheets, because when I need to consult a set of 8 cards for example, I can open those specific 8 cards without having to navigate between hundreds of sheets within one spreadsheet. 
Reply all
Reply to author
Forward
0 new messages