Excel SORT function
Returns a sorted range without changing the original data. In Spanish Excel it is called ORDENAR.
Syntax
English Excel
=SORT(array, [sort_index], [sort_order])
Spanish Excel (Mexico)
=ORDENAR(matriz, [índice_ordenación], [orden_ordenación])
Spanish Excel (Spain, Latin America)
=ORDENAR(matriz; [índice_ordenación]; [orden_ordenación])
| Argument | What it is |
|---|---|
| array | The range to sort. |
| sort_indexoptional | Which column of the range decides; 1 by default. |
| sort_orderoptional | 1 ascending, -1 descending. |
Example
SORT(range, column, order) returns the range sorted without touching the original data. The column is its number within the range (1, 2…); order is 1 for ascending and -1 for descending.
=SORT(A2:C11,3,-1)
Common mistake
Excel 365 and 2021 only. Combine it with UNIQUE or FILTER: SORT(UNIQUE(A2:A100)).
About Ads
This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.
Ads help us keep WebHerramientas free for everyone
Practice SORT
Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons
SORT
SORT(range, column, order) returns the range sorted without touching the original data. The column is its number within the range (1, 2…); order is 1 for ascending and -1 for descending.
In E2, show the whole table (without headers) sorted from the highest sale to the lowest.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Salesperson | Region | Amount | Sales ranking | ||||
| 2 | Carmen | North | 18,500 | |||||
| 3 | Jorge | South | 4,200 | |||||
| 4 | Lucía | North | 3,900 | |||||
| 5 | Andrés | Central | 21,000 | |||||
| 6 | Paola | South | 17,800 | |||||
| 7 | Ricardo | North | 6,400 | |||||
| 8 | Elena | Central | 5,900 | |||||
| 9 | Mateo | North | 19,900 | |||||
| 10 | Sofía | West | 800 | |||||
| 11 | Diego | Central | 4,600 | |||||
| 12 |
Tip: while typing, click a cell or drag across several to insert their reference.
Frequently asked questions
- What is SORT called in Spanish?
- In Spanish Excel it is ORDENAR. The formula =SORT(A2:C11,3,-1) is written =ORDENAR(A2:C11;3;-1) (or with commas in Mexico).
- Why does SORT use semicolons in some Excel versions?
- It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
- What is the most common SORT mistake?
- Excel 365 and 2021 only. Combine it with UNIQUE or FILTER: SORT(UNIQUE(A2:A100)).