Excel Sort columns of the table

You are currently viewing Excel Sort columns of the table

In Excel, to sort columns of the table, I will number the columns and use the Sort feature.

The following dataset contains some information about ice-creams.

Dataset

Now I want to sort the columns on my own. To accomplish the task, I perform the following steps:

I insert a new row above the data, by right-clicking on the first row and selecting Insert.

I enter a number in each column in the new row for sorting the columns. For example, I want the CID column to be the first column. So, I enter 1 in E1. Similarly, I do the same for rest of the columns. The final numbering goes as follows:

Numbering the columns to sort

Select the entire source data range including the numbers in the new row. Go to the Data tab and select Sort. The Sort dialog box will open. Click on the Options button. Select the Sort left to right option and click OK, like shown below:

Sorting data

From the Sort by menu, I select Row 1 as the numbers entered are on the first row:

Sorting data

Click OK and the columns will be sorted, like shown below:

Sorting columns

You can now delete the row which we created for sorting the columns.

I hope this post helped you.

Download Practice Workbook

Kunal

Hey, I am Kunal Aggarwal, the founder and author of Kunal Excel Tip based in New Delhi, India. I have completed my postgraduation from NIIT Limited, New Delhi in Excel course in 2019. Since then, I have been using and learning Microsoft Excel and started writing posts on the spreadsheet software here since March 2024.

Leave a Reply