Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Incomplete and Corrupt Sorting.

Incomplete and Corrupt Sorting

Written by Allen Wyatt (last updated December 18, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


2

The sorting capabilities of Excel are quite handy and quite powerful. The different ways you sort information has been covered in quite a few different issues of ExcelTips. What happens, however, if you try to sort something and Excel omits some columns from the sort and otherwise scrambles your data?

The most common cause for this problem is that Excel isn't recognizing all your data. If you select a single cell in the data table, and then click on either the Sort Ascending or Sort Descending tool, Excel makes its best guess as to what data you want sorted. It may not always make a perfect guess, particularly if there are blank columns, blank rows, or large empty ranges in the data.

One way to see if this is the real problem is to press Ctrl+Shift+* (that's an asterisk). This shortcut selects the "region" around the current cell. Essentially, when you start a sort from a single cell, Excel initiates this command before doing the actual sort. If you press Ctrl+Shift+* first, you can get an idea of exactly which columns and rows Excel will sort.

To make sure there is no confusion in what Excel actually sorts, all you need to do is select the range of columns and rows that you want sorted, and then do the sort.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10320) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Incomplete and Corrupt Sorting.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Keyboard Changes to Unwanted Foreign Language

There you are typing along, minding your own business, when wham! You end up in an entirely different language and you ...

Discover More

Copying Formats to a New Worksheet

Do you want to copy formats from one worksheet to another? You can do so easily by using the Format Painter. It even ...

Discover More

Deleting MRU Entries

By default Word dutifully keeps track of the different files you've worked on in the past. If you want to delete an entry ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Undoing the Effects of a Sort

Have you ever put a lot of data into a worksheet, sorted that data, and then realized you shouldn't have done so? It is ...

Discover More

Automatically Sorting as You Enter Information

When entering information into a worksheet, you may want it to always be in a correctly sorted order. Excel allows you to ...

Discover More

Importing Custom Lists

Custom lists are handy ways to enter recurring data in a worksheet. Here's how you can import your own custom lists from ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is nine minus 5?

2022-10-09 20:34:28

Kirt

Appreciate the article, but I've tried clicking on the header of the column I was to sort by, dragging until all the cells in the columns that are adjacent are in the selection box. Then sort by the header (yes, I mark my data has headers), and Excel invariably sorts that column correctly, but moves data cells in adjacent columns in a haphazard way. The method seems to work ok on text; but the column I'm sorting on has Dollar values. The other columns have simple numbers in one, and text fields in the other. While the column I'm sorting on gets sorted right, the others change the corresponding row cells, which screws up the Dollar values that are being calculated mathematically by multiplying the source columns.
I've tried selecting the cell, then accepting the expansion option, selecting the entire spreadsheet by clicking on the upper left "arrow", selecting all of the columns at the "letter" level. All produce the same break in data correlation.

Fortunately, I'm a Mac user and have a free spreadsheet "Numbers" that sort fine when I cut and pasted the data cells into it from excel. This needs to be fixed.


2021-12-20 04:08:16

Super_James

Good tip, as always.
I would add that the first step is to hit the back arrow to undo the incorrect sort.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.