Excel: How to Sort Data Using a Custom Sort Order

If you have some data in your spread sheet you can use the sort function to sort this data in either ascending order or descending order very easily.

Let’s say you have a list of 100 books under three categories - Fiction, Management, and Self-help. You can sort the books alphabetically by each category. Excel will provide you the option to sort the data in ascending order (A to Z) or descending order (Z to A). So, you can have books sorted as Fiction, Management, and then Self-help books, or you can have books sorted as Self-help, management, and Fiction books.

What if you want to sort them in a custom order? You want all management books to display first, fiction books after that and self-help books in the end.

To do so you can use the custom list facility available in excel.  Follow the following steps to sort your data in custom order.

Step 1: Place your cursor in any cell in the list that you want to sort.

Step 2: Select Data -> Sort. This will bring up the sort dialog box.

Step 3: From the ‘Sort By’ dropdown list, select the column that contains the books category.

Step 4: Leave the ‘Sort On’ dropdown list to the default (Values).

Step 5: From the ‘Order’ dropdown list, select ‘Custom List’. Another dialog box will appear where you will be asked to enter your custom list. Enter the values Management, Fiction and then Self-help. Press the ENTER key after entering each value. After entering all the values, click ‘Add’. The new list will now be added. Select this list, and click OK.

Your data is now sorted in the order of your custom list.

Data Science in Finance: 9-Book Bundle

Data Science in Finance Book Bundle

Master R and Python for financial data science with our comprehensive bundle of 9 ebooks.

What's Included:

  • Getting Started with R
  • R Programming for Data Science
  • Data Visualization with R
  • Financial Time Series Analysis with R
  • Quantitative Trading Strategies with R
  • Derivatives with R
  • Credit Risk Modelling With R
  • Python for Data Science
  • Machine Learning in Finance using Python

Each book includes PDFs, explanations, instructions, data files, and R code for all examples.

Get the Bundle for $39 (Regular $57)
JOIN 30,000 DATA PROFESSIONALS

Free Guides - Getting Started with R and Python

Enter your name and email address below and we will email you the guides for R programming and Python.

Data Science in Finance: 9-Book Bundle

Data Science in Finance Book Bundle

Master R and Python for financial data science with our comprehensive bundle of 9 ebooks.

What's Included:

  • Getting Started with R
  • R Programming for Data Science
  • Data Visualization with R
  • Financial Time Series Analysis with R
  • Quantitative Trading Strategies with R
  • Derivatives with R
  • Credit Risk Modelling With R
  • Python for Data Science
  • Machine Learning in Finance using Python

Each book comes with PDFs, detailed explanations, step-by-step instructions, data files, and complete downloadable R code for all examples.