Excel SORTBY function⚡ Sort by another column

The SORTBY function: Sort by another column. Names ordered by sales. This page shows the syntax, a worked example with its result and how the formula reads.

What does SORTBY do?

Sort by another column. Names ordered by sales

SORTBY syntax

=SORTBY(array, by_array1, [sort_order1], [by_array2, sort_order2], ...)

Arguments in square brackets [ ] are optional · argument names follow Microsoft's documentation

SORTBY example with the result

=********

👑 Ready-to-use example formula for VIP supporters only · Become VIP

Formula in cell D2 Yellow cells = result

ABCD
1NameScoreRanking
2Ton72Fon
3Fon95Mod
4Bee60Ton
5Mod88Bee

How it reads: Sorts the names by score, high to low, without showing the scores

💡 Excel version Works in Excel for Microsoft 365 and Excel 2021 or later, per Microsoft's function list · older versions show #NAME?

Frequently asked questions about SORTBY

What does SORTBY do?

Sort by another column. Names ordered by sales

What does the SORTBY example return?

The example formula in cell D2 spills its results into several cells starting at D2, as shown in the example table.

Which Excel versions have SORTBY?

Excel for Microsoft 365 and Excel 2021 or later, according to Microsoft's function list. Older versions show #NAME?.

Source: support.microsoft.com

Checked 17 November 2026 · by Black Sheep Barn · example results are calculated by the app's example engine, for learning

🤖
Posting...
Please wait a moment
Social VIP Classroom
Home
Thai Smiles Profile