Thank you. This was very helpful. I also had to be very mindful to be exact. Are you able to use the same script file to order another file - or do you need to open the google sheet and copy the code into the AppsScript for each file?
Yes you can order any range in other Google Sheets files. You can do this from a core script bound to say, a Google Sheet, or using a standalone script. You could even create core Sheet to add your other Sheet URLs to and run a daily time trigger to update them.
Thanks a tot, great lesson. Do you think possible apply sort function at all the tabs except the first two tabs or at a number I decide? Thanks and see you next
No problem. Yes, you could use a for loop to start your iteration at the desired index or use the filter method to exclude any specific tabs that you don't want included.
Thanks. Not directly unfortunately. Your best bet here is look at the onOpen() trigger function to reorder your tabs to their original position each time the Google Sheet is opened. developers.google.com/apps-script/guides/triggers#onopene
hey let's say I have 5 columns and there all filled with names but I want to alphabetize them all so that A1 would be like Adam and E30 would be zebra and all the names in between would sort accordingly Hopefully that made sense Also completely different question lets say I have a name in A1 and then I have a picture in A2 how do I lock these cell together so when do use the answer from the first question they are always together
I am curious if you know a work around for a bug flagged: ui: undefined while following your steps in the video. The extra menu option do not show up. Code: function onOpen(){ const ui = SpreedsheetApp.getUi(); ui .createMenu("Extras") .addItem("Sort Tab Asc", "tabSorter.ascending") .addItem("Sort Tab Desc", "tabSorter.desending") .addToUi(); }; const tabStarter = { ascending: function(){ this.sortTabs(true)}, decending: function(){ this.sortTabs(false)}, /** * Naturally sort tabs. * Sparam {boolean} inAscending - if true, then sort ascending, false sort descending */ sortTabs: function(inAscending){ SpreedsheetApp.getUi().alert("Is ascending: " + inAscending) } } Thank you for your help if you've for time.
This was my first time using App Script ever and it worked perfectly. Thank you so much for the great tutorial!!! Lifesaver
Fantastic to hear! Happy coding!
Thank you so much for this tutorial & script. Made my life so much easier.
Amazing. Thank you. It worked!
You're welcome!
Thank you, thank you, thank you! I've been manually alphabetizing my tabs and it was taking way too long. This was easy to understand and do.
Glad it helped!
I tried and tried to get it on my own and could not, your help sheet was a life send for sorting my 46 tab sheet! Thank you!
Glad I could help!
Thank you. This was very helpful. I also had to be very mindful to be exact. Are you able to use the same script file to order another file - or do you need to open the google sheet and copy the code into the AppsScript for each file?
Yes you can order any range in other Google Sheets files. You can do this from a core script bound to say, a Google Sheet, or using a standalone script.
You could even create core Sheet to add your other Sheet URLs to and run a daily time trigger to update them.
Thanks a tot, great lesson.
Do you think possible apply sort function at all the tabs except the first two tabs or at a number I decide?
Thanks and see you next
No problem. Yes, you could use a for loop to start your iteration at the desired index or use the filter method to exclude any specific tabs that you don't want included.
@@yagisanatode Thanks for answer, very useful
Scott… nice video… can we protect the order of the tabs using appscript? Thank you.
Thanks. Not directly unfortunately. Your best bet here is look at the onOpen() trigger function to reorder your tabs to their original position each time the Google Sheet is opened. developers.google.com/apps-script/guides/triggers#onopene
@@yagisanatode sounds reasonable. I’ll try it. Thanks Scott.
My message is saying TypeError: ss.getSheets is not a function Please help
What does your `const ss` variable look like?
hey let's say I have 5 columns and there all filled with names but I want to alphabetize them all so that A1 would be like Adam and E30 would be zebra and all the names in between would sort accordingly Hopefully that made sense Also completely different question lets say I have a name in A1 and then I have a picture in A2 how do I lock these cell together so when do use the answer from the first question they are always together
I am curious if you know a work around for a bug flagged: ui: undefined while following your steps in the video. The extra menu option do not show up.
Code:
function onOpen(){
const ui = SpreedsheetApp.getUi();
ui
.createMenu("Extras")
.addItem("Sort Tab Asc", "tabSorter.ascending")
.addItem("Sort Tab Desc", "tabSorter.desending")
.addToUi();
};
const tabStarter = {
ascending: function(){ this.sortTabs(true)},
decending: function(){ this.sortTabs(false)},
/**
* Naturally sort tabs.
* Sparam {boolean} inAscending - if true, then sort ascending, false sort descending
*/
sortTabs: function(inAscending){
SpreedsheetApp.getUi().alert("Is ascending: " + inAscending)
}
}
Thank you for your help if you've for time.
Hi! A couple of things I noticed.
Change "Spreedsheet" to "Spreadsheet"
@@yagisanatode oh my gosh thank you for showing me what went wrong!