Skip to playerSkip to main content
Learn how to custom sort rows in Excel.

In Excel, custom sorting rows allows users to arrange data according to specific criteria tailored to their needs. To custom sort rows in Excel, users can utilize the "Sort" feature accessible through the "Data" tab, where they can define their sorting preferences based on various parameters such as alphabetical order, numerical value, or date. Additionally, Excel offers the capability to sort by a custom list, enabling users to prioritize certain entries over others based on predefined preferences. Utilizing the SORTBY function further enhances sorting capabilities by enabling users to sort data dynamically based on the values of another range or array. Unlike traditional sorting methods, SORTBY function in Excel allows for more flexibility and automation in organizing data sets. The key difference between traditional sorting and SORTBY lies in the latter's ability to sort data based on specified criteria, providing a more nuanced approach to data arrangement in Excel.

Custom Sort Rows
=SORTBY(B5:C39,MATCH(B5:B39,E5:E39,0))

Let's breakdown this formula.

=SORTBY(B5:C39,MATCH(B5:B39,E5:E39,0))

1) SORTBY: This is the main function being used in the formula. It sorts the data in the range specified based on the values provided in another range or array.
2) B5:C39: This is the range of data that you want to sort. It consists of two columns: column B and column C, containing the data you want to sort.
3) MATCH(B5:B39,E5:E39,0): This part of the formula is used to determine the order in which the data should be sorted.
MATCH: This function searches for a specified value in a range and returns the relative position of that item in the range.
B5:B39: This is the range of values in column B that you want to find matches for.
E5:E39: This is the range where the values you want to match against are located.
,0: This specifies that you want an exact match.
So essentially, MATCH(B5:B39,E5:E39,0) finds the positions of the values in column B relative to the values in column E. These positions are then used by SORTBY to sort the data in the range B5:C39 accordingly.


Custom Sort Rows in Excel,How do you custom sort rows in Excel?,Sort by custom list,Sort by custom list with SORTBY,How do I use the SORTBY function in Excel?,What does SORTBY do in Excel?,What is the difference between sort and SORTBY in Excel?,

Check out my complete suite of Microsoft Excel Tips and Tricks.
https://www.youtube.com/@jjnet247/shorts
https://www.tiktok.com/@exceltips247
https://www.instagram.com/exceltips247/
https://www.dailymotion.com/ExcelTips247
https://www.pinterest.com/ExcelTips247/excel-tips-and-tricks/
https://x.com/ExcelTips247/media
https://www.reddit.com/r/Excel247/
https://www.facebook.com/XyberneticsInc/reels/

#microsoft #excel #tips #tipsandtricks #microsoftexcel #accounting #fyp #fypシ #exceltips #exceltricks

Category

📚
Learning
Transcript
00:00listen if you have to sort this data set based on say title there's two ways to do it first
00:06is to
00:06use the filter function you select the two header like this and you press ctrl shift l and then this
00:12pull down menu will come up and now you can basically do outbreaker order and you can get
00:16the answers here and the other way to do it would be to use a function called sort by so
00:21we're going
00:21to equal to sort by and then the first argument on that sort by would be the entire data set
00:28itself
00:28like this and then the second argument would be the column that you want to sort with like this
00:34close parenthesis and hit enter but the intent of this tip is not to sort based on alphabetical order
00:41the intent is to sort based on custom order as specified here how would you do it let me undo
00:46everything first you start off with a match function match function searches for values from b5 to b39
00:53within the range of e5 to e39 and returns the relative position with the exact matching and
01:00store it into an array then we can encapsulate the match with the sort by function basically sorting
01:07data from b5 to c39 with the output from the match function and after that hit enter you can see
01:14that
01:15the sorted list is sorting based on the custom order list in column e
Comments

Recommended