In this article, we will demonstrate 5 easy methods for rearranging columns in Excel alphabetically.
Method 1 – Using Excel Sort Feature
Suppose we have the following dataset of some people and their purchased products.
Let’s rearrange the columns alphabetically.
Steps:
- Select the column to rearrange.
- Go to the Data tab, click Sort & Filter, and choose A to Z.
- Click Expand the selection.
- Click Sort.
The column is rearranged alphabetically.
- Similarly, invert the sorting order of the column by Sorting Z to A.
The column is now in descending order.
Method 2 – Using the Filter Option
We will now apply the Filter feature on the same dataset to achieve the same result.
Steps:
- Select the headers of the columns to be rearranged.
- Go to the Data tab, click Sort & Filter and then Filter.
A small arrow appears at the right end of the selected cells.
- Click the arrow of the column you want to reorganize and a dialog box will open.
- Select whether you want to Sort by A to Z or by Z to A.
- Click OK.
The column will be sorted as specified.
Thus we can rearrange as many columns as we want alphabetically by using the Filter feature.
Read More: How to Automatically Rearrange Columns in Excel
Method 3 – Reorder Column Headings Alphabetically
Sometimes we might need to sort the headings of columns alphabetically in Excel. Suppose, we have a dataset of delivery details of different types of products to different addresses. The headings of the columns are ID > Customer > Product > Weight > Address. We’ll rearrange them into: Address > Customer > ID > Product > Weight.
Steps:
- Select all the columns to be rearranged.
- Go to the Data tab, select Sort & Filter and click the Sort option.
- In the dialog box that opens, click Options, choose Sort left to right, and click OK.
- Click the Sort by option.
- Choose the position of the column heading (row number) and click OK.
The column headings will be sorted alphabetically.
Thus, if we have random column headings, we can easily sort them alphabetically.
Method 4 – Using the SORT Function
In this method, we will reorganize columns using the SORT function. Suppose, we have the following dataset of numbers of purchased products for some different people.
We’ll rearrange data firstly by person and then by purchased products.
Steps:
- Create another column to store the results.
- In cell F7, apply the SORT function as follows:
- Array is the data range (B7:D14).
- [Sort_Index] specifies the column to sort by (1).
- [Sort_Order] specifies the sort the order (1).
- Press ENTER to return the output.
In this way we can give priority to one column, and if that column has repeated items we can further sort by another column.
Read More: How to Rearrange Columns in Excel to Match Another Sheet
Method 5 – Sorting by Last Text
Suppose we have the following dataset of names of some people and we want to sort them alphabetically by their last name.
We’ll use a formula that combines the RIGHT, LEN, and FIND functions to do so.
Steps:
- Enter the following formula in cell C5:
Formula Breakdown
- FIND(” “,B5) – looks for the space character within the value of cell B5 and returns the position.
Output: 5
- LEN(B5) – provides the length of the string within B5.
Output: 11
- LEN(B5)-FIND(” “,B5) – becomes 11-5.
Output: 6
- RIGHT(B5,LEN(B5)-FIND(” “,B5)) – becomes RIGHT(B5,6) and extracts 6 characters from the right of the string within B5 (Mike Harbor).
Output: Harbor
- Press ENTER to return the output.
- Use the Fill Handle to drag the formula to the cells below to get the column of last Names.
- Select the column.
- Go to the Data tab > Sort & Filter.
- Select Filter.
The Filter arrow appears next to the column header.
- Click the arrow, then Sort by A to Z, and click OK.
The column of last names is sorted alphabetically.
Thus if there are a number of words in the cells of a column, we can separate the words and sort alphabetically by the last ones.
Read More: How to Rearrange Columns in Excel
Download Practice Workbook
<< Go Back to Rearranging in Excel | Data Analysis with Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!