0PricingLogin
Excel Formulas Academy · Lesson

Ordering Results With SORT

Sort a spilled range ascending or descending automatically.

Meet the SORT Function

Sorting used to mean selecting your data and clicking a button every time it changed. The SORT function does it with a formula instead, so the order updates automatically whenever the source data changes.

SORT is a dynamic array function: you type it once in a single cell and the results spill down (and across) into the cells below. You never have to re-sort manually again.

=SORT(A2:A10)

The SORT Syntax

SORT takes up to four arguments:

  • array the range or array you want to sort
  • sort_index which column (or row) to sort by, counting from 1
  • sort_order 1 for ascending, -1 for descending
  • by_col TRUE to sort columns side to side, FALSE (the default) to sort rows top to bottom

Only the first argument is required. Leave the rest off and SORT sorts the first column ascending.

=SORT(array, [sort_index], [sort_order], [by_col])

All lessons in this course

  1. Ordering Results With SORT
  2. Sorting by Another Column With SORTBY
  3. Generating Numbers With SEQUENCE
  4. Creating Random Data With RANDARRAY
← Back to Excel Formulas Academy