How to Sort Data in MS Excel?
Sorting is the process of putting data in a logical order so that you may better evaluate it. In MS Excel, sorting data rearranges the rows based on the contents of a specific column. It may be required to sort a table to put names in alphabetical or alternatively, you might arrange data by Amount from smallest to greatest/from largest to smallest.
Sorting one column in Excel
Suppose you have a list of students in column C & you want to sort the complete data (4 columns) according to the student names in an alphabetical manner, then perform the following steps:
Step 1. Select the column on which sorting is to be performed, Column C in our example.
Step 2. Click on Data in the menu bar.
Step 3. Then choose sort & click on it.
Step 4. A dialog box for sort warning pops up. Continue with the selection if you want to sort data based on a single column, or Expand Selection if you want to sort data based on many columns.
Here we are choosing to continue with the current selection to sort column C.
Step 5. A new dialog box will pop up, You can see the heading name for Column C is the name & we can choose the options from the drop-down list for the order of sorting & on what base you want to sort.}
You can sort on basis of:
- Cell Color β sorting by Color of the Cell
- Values β sorting the data numerically or Alphabetically
- Font Color β sorting by Font color
- Cell Icon β sorting by Cell Icon.
We are choosing sort by value as we want to sort alphabetically.
Sorting order can be:
- A to Z β Ascending
- Z to A β Descending
- Custom β according to user need
As we want ascending order, we are choosing A to Z.
Step 6. Click on Ok
You will see the column C data (& according to all cells data) is now arranged in ascending order.
Sorting Multiple Columns in Excel
Suppose you have a list of students in column C & you want to sort it alphabetically, and then we want to sort column D based on 2 values: Registered & Not Registered, then perform the following steps:
Step 1. Select the column on which sorting is to be performed, Column C in our example.
Step 2. Click on Data in the menu bar.
Step 3. Then choose sort & click on it.
Step 4. A dialog box for a sort warning pops up. Continue with the selection if you want to sort data based on a single column, or Expand Selection if you want to sort data based on many columns. Here we are choosing to expand the selection to sort column C & then Column D.
Step 5. A new dialog box will pop up, you can see the heading name for Column C is the name & we can choose the options from the drop-down list for the order of sorting & on what base you want to sort.} You can sort on basis of:
- Cell Color β sorting by Color of the Cell
- Values β sorting the data numerically or Alphabetically
- Font Color βsorting by Font color
- Cell Icon β sorting by Cell Icon.
(i) We are choosing sort by value as we want to sort alphabetically.
Sorting order can be:
- A to Z β Ascending
- Z to A β Descending
- Custom β according to user need
(ii) As we want ascending order, we are choosing A to Z.
(iii) Now click on Add Level to then sort the complete data (after sorting according to names) according to column D values.
(iv) Now as we want the sorting of column D to be done according to 2 values: Registered & Not Registered. We click on Custom & then enter Registered, Not Registered in the List enter the section.
(v) Then Click Ok
Step 6. We are back to sort dialog box. Select Registered, Not Registered for column D (named Registered/Not For Internship) & click OK.
Step 7. The output will be:
First sorting is done alphabetically for column C and then column D is sorted based on 2 values: Registered & Not Registered.