How to sort data alphabetically in Excel?

Microsoft Excel provides several flexible tools for sorting data. Below we will consider how to sort in alphabetically, ascending, descending order in Excel. As well as several options for dynamic sorting.

Excel has several sorting options:

  1. Column Sort.
  2. Sort string.
  3. Sort area.
  4. Sort separately from cell-related information.
  5. Sort along with cell related information.
Exel appearance




How to sort alphabetically in Excel?

If you just need to arrange the information in the cells of the column alphabetically, then the algorithm is as follows:

  1. Select range.
  2. Find the option “Sort and filter” on the main tab on the right side, select it.
  3. In the pop-up dialog box, select "Sort within the specified selection."

Filters in Excel are automatically selected for selection criteria.

Excel Sort




Sorting information in a row

The algorithm is exactly the same, you only need to select a line. Next, repeat all the points from the previous part.





Sort along with related information

In order to sort rows or columns along with related information, you must:

  1. Select range.
  2. Find the "Sort and Filter" command on the main tab on the right side.
  3. In the pop-up dialog box, select "Automatically expand the selected range."

You can call up different sorting criteria: descending, ascending, from A to Z, from Z to A. The environment will automatically offer the desired option.

Sort by multiple fields

It is also possible to sort data by several fields of the document.

The algorithm is as follows:

  1. Select the sortable area.
  2. Select the "Sort and filter" option.
  3. In the pop-up window, select "Add Level" as many times as necessary.
  4. Select levels that require sorting.
  5. Select sorting criteria.
  6. Select a sort order.
  7. Apply changes.

How in Excel to sort alphabetically by several fields? Similarly, the sorting criteria will offer options from A to Z and from Z to A.

dynamic sort




Color sorting

An option is also provided for sorting data in cells by color:

  1. Select a range of multi-colored cells.
  2. Right-click, select “Cells with highlighted color first”.
  3. Confirm "Automatically expand the range."

It is also possible to flexibly adjust the sort order:





  • In the "Sort and Filter" option, select "Custom Sort".
  • Flexible pop-up options will automatically open in a pop-up window. It is only necessary to add the necessary number of levels, the sorting condition, indicate the sorting order of the colors, apply the changes.

Dynamic sorting of numbers

The above sorting methods in Excel are called “static sorting”, because sorting will work once and will no longer work when changing data in the table. If there is a need for automatic data sorting during further work on the table, then formulas will come to the rescue.

Suppose you want to sort a column of primes. It is necessary:

  1. Put the cursor in the next cell, in the column of which the sorted data is planned to be displayed.
  2. Enter the formula in it:
=(:;(1))
      
      



Now all data is sorted in ascending order. When data in the source column changes, the data in the output will automatically change. To sort in descending order, use the following formula:

 =(:;(1))
      
      



How to sort the lines dynamically in Excel?

The dynamic row sorting algorithm is similar to the previous one:

  1. Select the sortable column.
  2. In the name field, next to the formula bar, you must name the range. For example, if you need to sort the names of cars, enter “cars”
  3. In the next cell, enter the following formula:
 =(;(((;"<"&);(1:1));(;"<"&);0))
      
      



Data will be dynamically sorted alphabetically. What did you achieve.

Field name in Excel




These are the main ways to sort data. If you have any questions about how to sort cells alphabetically in Excel in ascending, descending order, it is recommended to use the official documentation for MS Office on the Microsoft website.

Also, for complex calculations, it is recommended that you familiarize yourself with macros. Macros are scripts that allow you to flexibly solve non-standard tasks. To use all the features of macros and the Visual Basic programming language in which they are written, you must have basic programming skills. At first, macros may seem more complicated than the usual Excel formulas and filters, but they provide much more possibilities.




All Articles