MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Excel 2019: Sort Left to Right


April 01, 2019 - by Bill Jelen

Excel Sort Left to Right. Photo Credit: Nolan Simmons at Unsplash.com

Every day, your IT department sends you a file with the columns in the wrong sequence. It would take them two minutes to change the query, but they have a six-month backlog, so you are stuck rearranging the columns every day.

9 columns of data are presented in a crazy order. Last Name is in A. Apartment is in B. Street is in C. Company in D.

You can reorder the columns with a left-to-right sort.


Add a new row above the data. Type numbers to represent the correct sequence for the columns.

Select Data, Sort. In the Sort dialog, click the Options... button and choose Sort Left to Right. Click OK.

Insert a temporary row 1 above the headings. Type the numbers 1 through 9 in the correct sequence. For example, First Name should be 1. Middle Initial is 2. Last Name is 3. Company is 4. Street is 5. Select all the data and open the Sort dialog. Click the Options button in the top right and there are three choices in Sort Options:  Case Sensitive. Sort Top to Bottom. Sort Left to Right. Choose Sort Left to Right and sort by Row 1.

Specify Row 1 in the Sort By dropdown. Click OK.

In this screenshot, you've selected Sort by Row 1, Sort on Values, Smallest to Largest.

The problem: The column widths do not travel with the columns.

The data is now presented left to right in a logical order. First Name, Middle Initial, Last Name, and so on. At this point, you can delete the temporary row 1.

But it is easy to select the data and Press Alt+O, C, A or select Home, Format, Column, AutoFit.

Title Photo: Nolan Simmons at Unsplash.com


Bill Jelen is the author / co-author of
Microsoft Excel 2019 Inside Out

Dive into Microsoft Excel 2019–and really put your spreadsheet expertise to work. This supremely organized reference packs hundreds of timesaving solutions, tips, and workarounds–all you need to make the most of Excel’s most powerful tools for analyzing data and making better decisions.