How to Unsort in Google Sheets

Google Sheets has no “unsort” button. Right after sorting, press Ctrl + Z (Cmd + Z on Mac) to undo it. Later on, use File > Version history to restore a version from before the sort. To be able to “unsort” at any time, add an index column numbered 1, 2, 3… before sorting; sorting by that column restores the original order. Filter views let you sort for yourself without changing the order others see.

Quick Answer

Undo with Ctrl + Z, or restore from Version history. For the future, add an index column and sort by it to return to the original order.

Steps to Restore the Original Order

  1. If you just sorted, press Ctrl + Z.
  2. Otherwise open File > Version history > See version history, pick a version from before the sort and click Restore this version. Note this also removes later edits.
  3. Before your next sort, insert a column, type 1 and 2 in the first rows, and drag down to number every row.
  4. Sort by any column you like; to go back, sort the index column A → Z.
Spreadsheet with an index column added so the original order can be restored by sorting it A to Z
An index column lets you return to the original order.

Options at a Glance

Method When it works
Undo (Ctrl + Z) Immediately after sorting
Version history Any time, but also rolls back later edits
Index column Any time, if added before sorting
Filter views Sort privately without changing the shared order

Add an Index Column Step by Step

  1. Right-click the column A header and choose Insert 1 column left.
  2. Type a heading such as “Order” in A1, 1 in A2 and 2 in A3.
  3. Select A2 and A3, then double-click the small blue square at the bottom-right of the selection to fill the numbers down to the end of your data.
  4. Sort the sheet any way you like. To get the original order back, sort by column A from A to Z.

Avoid using a formula such as =ROW()-1 for the index unless you then copy the column and use Edit > Paste special > Values only. A formula recalculates after sorting, so it won’t remember the original order.

Sort a Copy With the SORT Function

If you need a sorted view but never want to touch the original data, leave the source untouched and build a sorted copy beside it. In an empty cell, type a formula such as =SORT(A2:C100, 2, TRUE), which sorts rows 2 to 100 by the second column in ascending order. Use FALSE for descending. The sorted copy updates automatically when the source changes, and there’s nothing to unsort.

Recover the Order Without Losing Later Edits

Restoring an old version undoes every change made since. If people have edited the sheet after it was sorted, open File > Version history > See version history, select the version from before the sort, open the three-dot menu, and choose Make a copy. You can then copy the original order (or an index column) from that copy into the current sheet instead of overwriting everyone’s work.

Avoid Accidental Sorts

  • Use Data > Sort range with Advanced range sorting options and tick Data has header row, so headings stay at the top.
  • Sort the whole table, never a single column on its own, or rows will get mixed up.
  • On shared sheets, use Data > Create filter view so your sorting doesn’t change what collaborators see.
  • Protect important ranges with Data > Protect sheets and ranges to limit who can rearrange them.

For more sorting options, see how to custom sort in Google Sheets and how to sort dates in Google Sheets.

Troubleshooting

Frequently Asked Questions

Can I restore just one column from version history?

Copy the cells from the older version, then paste them into the current sheet.

Do filter views affect collaborators?

No. Sorting in a filter view only changes your view.

Can I hide the index column?

Yes. Right-click the column header and choose Hide column.

Summary

  1. Undo right away if you can.
  2. Use Version history for older sorts.
  3. Add an index column before sorting.
  4. Use filter views for private sorting.