Excel SORTBY Function | Excel One Minute Quick Reference

Posted on:  10/18/2021
Excel SORTBY Function  |  Excel One Minute Quick Reference

The SORTBY function in Excel sorts the contents of a range or array based on the values in a corresponding range or array. Use SORTBY to see a list of employees sorted by highest paid, but you don't show their salaries. USE SORTBY to sort a customer list by the most profitable customer but not see the revenue. 

SORTBY has two required arguments, but you can sort by multiple criteria. You can use the SORTBY function on another worksheet or on another file or workbook.

SORTBY function in Excel

SORTBY Function in Excel

YouTube video

Other Excel articles

Syntax for SORTBY

 

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

 

Arguments for SORTBY

  • array - The array or range to sort - Required
  • by_array1 - The array or range to sort on - Required
  • [sort_order1] - The order to use for sorting. 1 for ascending, -1 for descending. Default is ascending.
  • [by_array2] - The array or range to sort on
  • [sort_order2] - The order to use for sorting. 1 for ascending, -1 for descending. Default is ascending

Versions of Excel the SORTBY function works in

  • Excel for Microsoft365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2021
  • Excel 2021 for Mac
  • Excel for iPad
  • Excel for iPhone
  • Excel for Android tablets
  • Excel for Android phones

Latest Excel articles

Excel - Advanced Filters

Excel - Advanced Filters

Excel 3D Reference - easily reference data on another worksheet

Excel 3D Reference - easily reference data on another worksheet

What is the Middle Class and Are You in the Middle Class?

What is the Middle Class and Are You in the Middle Class?

Excel - 3 Cool methods to extract text from the beginning of a text string

Excel - 3 Cool methods to extract text from the beginning of a text string

Artificial Intelligence (AI) in Microsoft 365

Artificial Intelligence (AI) in Microsoft 365

Analyze Data Command in Excel - Ask questions about your data using AI

Analyze Data Command in Excel - Ask questions about your data using AI

Chris Menard

Chris Menard is a Microsoft Certified Trainer (MCT) and is employed full-time as a Trainer for BakerHostetler, one of the nation’s largest law firms. Menard has a YouTube channel with over 900 technology videos covering Excel, Word, Zoom, Teams, Outlook, Gmail, Google Calendar, and other resources that over 16 million viewers have appreciated. Menard also does public speaking at conferences for CPAs and Administrative Professionals. Connect with Chris on LinkedIn at chrismenardtraining.com/linked or on YouTube at chrismenardtraining.com/youtube

Categories