মূল বিষয়বস্তুতে যান
Dynamic ArraysAdvanced LevelAdvanced Excel (Dynamic Arrays & Automation)

How to Use SORT in Excel

Returns a sorted copy of a range as a spilled array, leaving the original data untouched.

Direct Answer (Quick Summary)

What is SORT in Microsoft Excel?

SORT produces a new, sorted version of your range without disturbing the source. Because it is a formula, it re-sorts automatically when the underlying data changes. That makes it ideal for live leaderboards, top-N lists and dashboards that must never go stale.

Pro Tip: Pair SORT with TAKE to get a self-updating top N: =TAKE(SORT(A2:C100,3,-1),10) returns the ten highest rows by column 3.

Formula Syntax

=SORT(array, sort_index, sort_order, by_col)

Arguments Breakdown

ArgumentRequirementPurpose & Details
arrayRequiredThe range or array to sort.
sort_indexOptionalWhich column or row to sort by, counted from 1. Defaults to 1.
sort_orderOptional1 for ascending (default), -1 for descending.
by_colOptionalFALSE sorts rows (default), TRUE sorts columns.

When to Use SORT (Real-World Business Scenarios)

  • 1

    Building a live top-10 list that re-ranks itself as values change.

  • 2

    Sorting a filtered result: =SORT(FILTER(...),2,-1).

  • 3

    Creating a sorted copy for a chart without touching the source table.

Step-by-Step Practical Business Example

Suppose you have the following dataset in Excel cells A1:D4:

SalespersonRegionSales
RahulNorth125000
PoojaSouth98000
AmanWest142000
Applied Formula:Result: Spills Aman 142000, Rahul 125000, Pooja 98000
=SORT(A2:C4,3,-1)

How it works: Sorts the whole three-column range by column 3 in descending order, so the highest seller appears first.

Common Errors & How to Fix Them

#SPILL!

Why it happens: There is not enough empty space below and to the right for the sorted output.

Fix: Clear the area under the formula, or wrap it in INDEX to return a single row.

#VALUE!

Why it happens: sort_index is larger than the number of columns in the array.

Fix: Count the columns and pass a valid index, remembering that counting starts at 1.

Interactive Formula Lab

Try SORT Live in Your Browser

No need to launch desktop Excel. Practice formulas with real-time feedback in our HyperFormula sandbox.

Open Practice Lab

Frequently Asked Questions (SORT)

What does the SORT formula do in Excel?

SORT produces a new, sorted version of your range without disturbing the source. Because it is a formula, it re-sorts automatically when the underlying data changes. That makes it ideal for live leaderboards, top-N lists and dashboards that must never go stale.

What is the syntax for SORT?
=SORT(array, sort_index, sort_order, by_col)
What are common mistakes when using SORT?

#SPILL!: There is not enough empty space below and to the right for the sorted output. (Clear the area under the formula, or wrap it in INDEX to return a single row.) #VALUE!: sort_index is larger than the number of columns in the array. (Count the columns and pass a valid index, remembering that counting starts at 1.)

Keep building your formula toolkit with these dynamic arrays functions.

Browse all 41 Excel formulas
Ready to Master Microsoft Excel?

Master SORT in Advanced Excel

Learn SORT along with our formula library, practice files, and verifiable certificates in our complete curriculum.

Strictly necessary