Lookup & Reference Excel 2021 ◉ 4 views Dynamic Array

=SORT()

Learn about the SORT function, which sorts the contents of a range or array. SORT is in a class of functions called dynamic arrays.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel for iPadExcel for iPhoneExcel for Android tabletsExcel for Android phones
=SORT(array,[sort_index],[sort_order],[by_col])
Hover argument names in the table for details.
Output typeArray
Popularity50 / 100
VolatileNo
Dynamic ArrayYes
📥 Download sample .xlsx — Coming soon ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =SORT() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
📥 Download SORT.xlsx — Coming soon ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

🧠 🧠 Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
array Any type Required The range, or array to sort
sort_index] Number Optional A number indicating the row or column to sort by
sort_order] Number Optional A number indicating the desired sort order; 1 for ascending order (default), -1 for descending order
by_col] Logical Optional A logical value indicating the desired sort direction; FALSE to sort by row (default), TRUE to sort by column

▣ Examples

Example 1 =SORT(A2:C100, 3, -1)
Example 2 =SORT(UNIQUE(A2:A100))

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.