Is it possible to have a small script that will re-arrange the order of the sheet tabs moving the currently selected sheet tab to the far left (the beginning) of all the tabs in a Google Spreadsheet?
To move a sheet: Click and drag the tab of the sheet you want to move. Release the mouse to place the tab at the desired location.
You can click and drag any sheet left or right to change where it appears in relation to other sheets within your spreadsheet document. Left-click on and sheet and hold the mouse button while you drag the sheet either left or right. Release the mouse button to place the sheet in the new location.
getActiveSheet() Gets the active sheet in a spreadsheet. The active sheet in a spreadsheet is the sheet that is being displayed in the spreadsheet UI.
In a Google Sheet on the web, select a cell in a column, then choose Data | Sort Sheet By… options to sort either A-Z or Z-A.
Yes and No. It can be done by sweet name, but not by the current sheet you are looking at. Below is some code I wrote that moves a sweet to the first position every day.
function tab() {
var reportDate = new Date();
var tabName = Utilities.formatDate(reportDate, 'MST', 'yyyy-MM-dd').toString();
var tab = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(tabName);
SpreadsheetApp.setActiveSheet(tab);
SpreadsheetApp.getActiveSpreadsheet().moveActiveSheet(1);
}
function BacktotheFront() {
SpreadsheetApp.getActiveSpreadsheet().moveActiveSheet(1);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With