# Excel Sort

## Excel Sorting

Ranges can be sorted using the **Sort Ascending** and **Sort Descending** commands.

**Sort Ascending**: from smallest to largest.

**Sort Descending**: from largest to smallest.

The sort commands work for text too, using A-Z order.

**Note:** To sort a range that has more than one column, the whole range has to be selected. Sorting just one can breaks the relationship between columns.

This is shown in an example later in this chapter.

The commands are found in the Ribbon under the **Sort & Filter** menu ()

## Example Sort (text)

Sort the Pokemons in the range **A2:A21** by their **Name**, ascending from smallest to largest (A-Z).

- Select
**A2:A21** - Open the
**Sort & Filter**menu - Click
**Sort Ascending**

**Note:** **A1** is not included as it is the header for the column. This is the row that is dedicated to the filter. Including it will blend it with the rest.

The **Sort Ascending** function successfully sorted the Pokemons by their **Name** ascending from A-Z.

Try again, this time with **Sort Descending** to see what that looks like!

## Example Sort (numbers)

Sort the Pokemons ascending by their **Total stats** from smallest to largest.

Select

**A2:A21**

Open the

**Sort & Filter**menu

Click

**Sort Ascending**

**Great!** The Pokemons were successfully sorted by their **Total stats** from smallest to largest. The sort commands work for both text and numbers.

## A Non-Working Example (sorting one column in a range)

In this example we have two columns with related data. Column **A** is the Pokemons **Names** and Column **B** is their **Total stats**. Try sorting just one of the columns (**A2:A21**) ascending by their **Names**.

The attempt to sort results in a warning.

It is not recommended to sort the names alone because it will break the relationship between the Pokemons **Names** and their **Total stats**.

**Click "Just sort" to see what happens.**

This breaks the relationship with Column **A** and **B**. The Pokemons now have wrong Total stats.

Clicking the other option in the warning "Expand and Sort" makes the sort function include Column **B** and sorts them in relation to each other.

## Sorting More Than One Column

Select the whole range when sorting ranges with more than one column.

**Note:** When sorting multiple columns, it will always sort by the first column (leftmost).

Select **A2:B21** and sort the range ascending.

By selecting range **A2:B21** it sorts correctly, keeping the relationship between the data (Column **A** and **B**).

In the next chapter you will learn about **Filter**.