How to Sort Data in Alphabetical Order in Excel (8 Methods)

Get FREE Advanced Excel Exercises with Solutions!

Quite often, we have to perform the Sort operation on our Excel data. Additionally, we can sort the data based on numerous orders. The Alphabetical Order is one of the most used ones. However, manually sorting in alphabetical order in a large worksheet is a tiresome job. In this article, we will show you the simple yet effective methods to Sort Data in Alphabetical Order in Excel.

To illustrate, we will use a sample dataset as an example. For instance, the following dataset represents the Salesman, Product, and Net Sales of a company.

how to sort data in alphabetical order in excel


How to Sort Data in Alphabetical Order in Excel (8 Easy Methods)


1. Sort Value in Alphabetical Order in Excel with Sort Feature

The Excel Sort feature helps us to sort the data very easily. In our first method, we will use this feature. Therefore, follow the steps to perform the task.

STEPS:

  • First, select the range B5:D10.
  • Then, go to Home Editing Sort & FilterSort A to Z.

Sort Value in Alphabetical Order in Excel with Sort Feature

  • Finally, you’ll get the sorted result.

Read More: How to Undo Sort in Excel


2. Apply Excel Filter Feature to Set Data in Alphabetical Order

We can also apply the Filter feature to Sort data. So, learn the below steps to carry out the task.

STEPS:

  • Firstly, click B4.
  • After that, select Home EditingSort & Filter Filter.

Apply Excel Filter Feature to Set Data in Alphabetical Order

  • Now, press the drop-down beside the Salesman header and select Sort a to Z.

  • At last, it’ll return the sorted data.

Read More: How to Add Sort Button in Excel


3. Sort Multiple Columns in Excel

Moreover, we can sort multiple columns at the same time. This is particularly helpful when we have the same values in multiple cells of a column. Hence, follow the process to Sort Data in Alphabetical Order in Excel.

STEPS:

  • In the beginning, select the range B5:D10.
  • Then, select Data Sort & FilterSort.

Sort Multiple Columns in Excel

  • Consequently, the Sort dialog box will pop out.
  • Now, press Add Level.
  • Next, select Salesman in Sort by and Product in Then by fields.
  • Subsequently, select A to Z from the Order options and press OK.

  • In the end, you’ll get the desired sorted data.

Read More: How to Sort by Color in Excel


4. Alphabetically Sorting Rows

By default, Excel applies the Sort operation from top to bottom. But, we can sort left to right through a small setting. Therefore, learn the process of sorting rows alphabetically.

STEPS:

  • First of all, select the range and go to Data Sort & Filter ➤ Sort.
  • As a result, the Sort dialog box will pop out. Here, press Options.

Alphabetically Sorting Rows

  • Afterward, select the circle for Sort left to right and press OK.

Alphabetically Sorting Rows

  • Then, select Row 4 (Headers row) and select A to Z in Order.
  • Subsequently, press OK.

  • Eventually, it’ll return the reorganized data.

Read More: How to Remove Sort by Color in Excel


5. Order Data in Excel Using SORT Function

Additionally, we can use the Excel SORT function for ordering data. So, follow the procedure.

STEPS:

  • Select cell F5 at first.
  • Here, type the formula:
=SORT(B5:D10,1,1)
  • Lastly, press Enter and it’ll spill the rearranged data.

Order Data in Excel Using SORT Function

Read More: How to Sort Data in Excel Using Formula


6. Create a Helper Column for Sorting Value in Alphabetical Order

However, we can create a Helper Column for Sorting values alphabetically. In order to perform the task, learn the following steps.

STEPS:

  • Firstly, select cell E5 and type the formula:
=COUNTIF($B$5:$B$10,"<="&B5)
  • After that, press Enter and use the AutoFill tool to complete the series.

Create a Helper Column for Sorting Value in Alphabetical Order

The COUNTIF function compares the text values and returns their relative rank.

  • Now, select cell F5. Here, type the formula:
=INDEX($B$5:$B$10,MATCH(ROWS($E$5:E5),$E$5:$E$10,0))
  • Next, press Enter and complete the rest with the AutoFill tool.

Create a Helper Column for Sorting Value in Alphabetical Order

How Does the Formula Work?

  • ROWS($E$5:E5)

The ROW function returns the respective row numbers.

  • MATCH(ROWS($E$5:E5),$E$5:$E$10,0)

The MATCH function returns the relative position of the items present in the range $E$5:$E$10.

  • INDEX($B$5:$B$10,MATCH(ROWS($E$5:E5),$E$5:$E$10,0))

Finally, the INDEX function returns the value present in the row spilled from the MATCH(ROWS($E$5:E5),$E$5:$E$10,0) formula.

  • Then, in cell G5, type the formula:
=INDEX($C$5:$C$10,MATCH(ROWS($E$5:E5),$E$5:$E$10,0))
  • Press Enter and fill the series using AutoFill.

How Does the Formula Work?

  • ROWS($E$5:E5)

The ROW function returns the respective row numbers at first.

  • MATCH(ROWS($E$5:E5),$E$5:$E$10,0)

The MATCH function returns the relative position of the items present in the range $E$5:$E$10.

  • INDEX($C$5:$C$10,MATCH(ROWS($E$5:E5),$E$5:$E$10,0))

Finally, the INDEX function returns the value present in the row spilled from the MATCH(ROWS($E$5:E5),$E$5:$E$10,0) formula.

  • Subsequently, in cell H5, type the formula:
=INDEX($D$5:$D$10,MATCH(ROWS($E$5:E5),$E$5:$E$10,0))
  • Finally, press Enter and complete the rest with AutoFill.

How Does the Formula Work?

  • ROWS($E$5:E5)

The ROW function returns the respective row numbers at first.

  • MATCH(ROWS($E$5:E5),$E$5:$E$10,0)

The MATCH function returns the relative position of the items present in the range $E$5:$E$10.

  • INDEX($D$5:$D$10,MATCH(ROWS($E$5:E5),$E$5:$E$10,0))

Finally, the INDEX function returns the value present in the row spilled from the MATCH(ROWS($E$5:E5),$E$5:$E$10,0) formula.

Read More: How to Sort by Ascending Order in Excel


7. Combine Excel Functions to Organize Data

To avoid the hassle of creating a helper column, we can combine some Excel Functions to sort data.

STEPS:

  • Select cell E5 at first.
  • Then, type the formula:
=INDEX($B$5:$B$10,MATCH(ROWS($B$5:B5),COUNTIF($B$5:$B$10,"<="&$B$5:$B$10),0))
  • Next, press Enter and use the AutoFill tool to fill the series.
  • Lastly, you’ll get organized data.

Combine Excel Functions to Organize Data

How Does the Formula Work?

  • COUNTIF($B$5:$B$10,”<=”&$B$5:$B$10)

The COUNTIF function compares the text values present in the range $B$5:$B$10 and returns their relative rank at first.

  • ROWS($B$5:B5)

The ROWS function returns the respective row numbers.

  • MATCH(ROWS($B$5:B5),COUNTIF($B$5:$B$10,”<=”&$B$5:$B$10),0)

The MATCH function returns the relative position of the items present in the specified range which is the output of COUNTIF($B$5:$B$10,”<=”&$B$5:$B$10).

  • INDEX($B$5:$B$10,MATCH(ROWS($B$5:B5),COUNTIF($B$5:$B$10,”<=”&$B$5:$B$10),0))

In the end, the INDEX function extracts the names in alphabetical order.


8. Sort Mixed Data Alphabetically in Excel

Sometimes, we may have to sort mixed data that contains duplicates, blanks, and numbers. In our last method, we’ll solve this kind of case. So, follow along to learn how to Sort Mixed Data in Alphabetical Order in Excel.

STEPS:

  • In the beginning, select cell E5 and type the formula:
=COUNTIF($B$5:$B$10,"<="&B5)
  • Then, press Enter and fill the series with AutoFill.

Sort Mixed Data Alphabetically in Excel

Here, it compares the text values and returns the relative rank.

  • After that, in cell F5, type the formula:
=--ISNUMBER(B5)
  • Subsequently, press Enter and complete the rest with AutoFill.

Sort Mixed Data Alphabetically in Excel

The ISNUMBER function looks for the Number values.

Sort Mixed Data Alphabetically in Excel

  • Select cell G5 to type the formula:
=--ISBLANK(B5)
  • Press Enter and use AutoFill to complete the rest.

Sort Mixed Data Alphabetically in Excel

Here, the ISBLANK function looks for the blank cells.

  • Afterward, select cell G11 and apply the AutoSum feature to find the total.

  • Select cell H5 and type the formula:
=IF(ISNUMBER(B5),E5,IF(ISBLANK(B5),E5,E5+$F$11))+$G$11
  • Press Enter and use the AutoFill tool.

NOTE: This formula with the IF function segregates blanks, numbers, and text values. If the cell is blank, it returns the sum of cell E5 and cell G11. For any numerical value, it returns the comparative rank and adds the total number of blanks. If it is text, it will return the comparative rank and add the total number of numerical values and blanks.

  • Now, select cell I5 and type the formula:
=IFERROR(INDEX($B$5:$B$10,MATCH(SMALL($H$5:$H$10,ROWS($I$5:I5)+$G$11),$H$5:$H$10,0)),"")
  • Next, press Enter and use the AutoFill tool.
  • Finally, it’ll return the sorted data with the blank cell at the last position.

How Does the Formula Work?

  • ROWS($I$5:I5)

Firstly, the ROWS function returns the respective row numbers.

  • SMALL($H$5:$H$10,ROWS($I$5:I5)+$G$11)

Here, the SMALL function returns the specified smallest value from the range $H$5:$H$10.

  • MATCH(SMALL($H$5:$H$10,ROWS($I$5:I5)+$G$11),$H$5:$H$10,0)

The MATCH function returns the relative position of the items present in the specified range.

  • INDEX($B$5:$B$10,MATCH(SMALL($H$5:$H$10,ROWS($I$5:I5)+$G$11),$H$5:$H$10,0))

The INDEX function extracts the names in alphabetical order from the range $B$5:$B$10.

  • IFERROR(INDEX($B$5:$B$10,MATCH(SMALL($H$5:$H$10,ROWS($I$5:I5)+$G$11),$H$5:$H$10,0)),””)

Lastly, the IFERROR function returns blank if an error is found, otherwise returns the data.

Read More: How to Sort Alphanumeric Data in Excel 


Problems While Sorting Data in Alphabetical Order in Excel

1. Blank or Hidden Columns and Rows

If there are blank or hidden data, we will not get the sorted result correctly. So, we need to delete the blank cells before applying the Sort operation to ensure a precise result.


2. Unrecognizable Column Headers

Again, if the headers are in the same format as the regular entries, it is likely that they will end up somewhere in the middle of the sorted data. To prevent this, select only the data rows, and then apply the Sort operation.


Download Practice Workbook

Download the following workbook to practice by yourself.


Conclusion

Henceforth, you will be able to Sort Data in Alphabetical Order in Excel with the above-described methods. Keep using them and let us know if you have any more ways to do the task. Don’t forget to drop comments, suggestions, or queries if you have any in the comment section below.


Related Articles


<< Go Back to Sort in Excel | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Aung Shine
Aung Shine

Aung Shine completed his bachelor’s in Electrical and Electronics Engineering from Bangladesh University of Engineering and Technology. It has been almost 2 years since he joined SOFTEKO and actively working on the ExcelDemy project. Currently he works as a Team Leader where he guides his team members to create technical content. He has published 150+ articles and reviewed 50+ articles. He has also solved various user problems before. He has interests in Data Analysis, Power Query, Advanced Excel,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo