ExcelFlux

SORT function

Sort the location list alphabetically.

Lookup and reference

Where can you use it?

Reporting and operations teams. Use functions in this group to retrieve a field from an item, employee or order list, select the right record, or move values into another report.

Scenario in the workbook

Sort amounts in ascending order. Inspect each output position with INDEX.

A worked example from the workbook

RowAB
6Source valueOutput position
7301
8102
9203
Record 1
=INDEX(SORT($A$7:$A$9),B7,1)

Expected result10

See the inputs and instructions for all 3 examples

Copyable formulas

English Excel · en-US
=SORT(A2:A4,1,1)
Turkish Excel · tr-TR
=SIRALA(A2:A4;1;1)

Example and expected result

Enter L03, L01 and L02 in A2:A4. The first 1 selects column one and the second 1 specifies ascending order. Supported in Microsoft 365, Excel 2021 and Excel 2024.

Expected result L01, L02, L03.

Worked examples

Sort amounts in ascending order. Inspect each output position with INDEX.

Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.

Row A B
6 Source value Output position
7 30 1
8 10 2
9 20 3
Case Formula Expected result
Record 1 =INDEX(SORT($A$7:$A$9),B7,1) 10
Record 2 =INDEX(SORT($A$7:$A$9),B8,1) 20
Record 3 =INDEX(SORT($A$7:$A$9),B9,1) 30
Microsoft Excel reference