0

If I have a Google Sheets document (Workbook in Excel terms) with 20 sheets (Worksheet in Excel terms) and I want to rearrange the order of the sheets currently the only way I know to do this is to drag them horizontally.

This works fine when you have a few sheets, but with 20 or more sheets its very slow if I want to take sheet 20 and put it next to sheet 1. Ive also noticed that if you right click a sheet you have the option to move it left or right, but this only moves in one sheet "slot" at a time, so no quicker than the dragging method.

Is there a quicker way to do this than just dragging a sheet horizontally along the bottom bar?

2

You could use Google Apps Script to reorder the sheets. First you should activate the sheet to move, either manually or by the script, then use the moveActiveSheet(position) method of the Class Spreadsheet.

Example

This moves the active sheet to the position 1

function moveSheetToPos1(){
  SpreadsheetApp.getActiveSpreadsheet().moveActiveSheet(1);
}

Related

0

No, this is the only way to shuffle the individual sheets on the sheet bar.

Note: maybe this would be possible with a script which will randomly shuffle sheets' gids based on a pre-defined trigger (not sure if...)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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