Sort a Google Sheet with Vertically Merged Ranges

This is a quick tip, but if you’ve ever tried to sort a sheet with vertically-merged rows, you’ve probably been disappointed. Here’s an example:

A spreadsheet table with vertically merged cells in Column A. The merged cells are team names. Cells in column B have people names.

If you wanted to sort your sheet by Column A, you’re out of luck. You can’t do that automatically because Sheets doesn’t know how to move blocks of unmerged cells even though they’re right next to the merged range. Your best bet in that case is to highlight all of the rows in the merged range and drag & drop in the correct order.

Even though the gray line while you’re dragging makes you think you can drop a merged range into another, you’ll get an error if you actually try to do that.

This won’t work for super-large data sets, so try to alphabetize as you go.

You can, however, sort ranges within selections, not just the entire sheet. So I can sort the names within each team to make life easier.

Highlight your range and right click to bring up the menu. At the bottom, hover over “View more cell actions” and then select Sort Range.

A screenshot showing the context menu. Right click a selected range then go to "View more cell actions" and select "Sort range".

You can sort this selection how you’d like to at least have your subset data in the right order.

This is why I typically don’t use merged cells when creating large spreadsheets. It makes it harder to move data around the way I’d like to.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.