Sort Excel by Two Columns: A Step-by-Step Guide

Sorting data in Excel can be a breeze once you understand the basics. Today, we're going to delve into a powerful feature that allows you to sort data not just ...

Sorting data in Excel can be a breeze once you understand the basics. Today, we're going to delve into a powerful feature that allows you to sort data not just by one column, but by multiple columns, giving you a more comprehensive and organized view of your data.

Grouping Rows/Columns in Excel📚
Grouping Rows/Columns in Excel📚

Imagine you have a list of products with their categories and prices. You might want to sort this list first by category, then by price. Let's explore how to achieve this in Excel.

Resize Rows and Columns
Resize Rows and Columns

Understanding Sorting by One Column

Before we dive into sorting by multiple columns, let's ensure you're comfortable with sorting by a single column.

Excel Sort By Column, By Row, By Color, By Your Own Custom List
Excel Sort By Column, By Row, By Color, By Your Own Custom List

Select the data you want to sort. Click on the 'Data' tab in the ribbon, then click on 'Sort & Filter'. In the dropdown menu, choose 'Sort A to Z' or 'Sort Z to A', depending on your preference.

Sorting in Ascending Order

Excel Sort by Column or Row One or Multiple Sort by Cell Color Font Color Customize Sort
Excel Sort by Column or Row One or Multiple Sort by Cell Color Font Color Customize Sort

To sort in ascending order (A to Z or smallest to largest), select your data, click on 'Sort & Filter', then 'Sort A to Z'.

For example, if you have a list of names and you want to sort them alphabetically, this is how you do it.

Sorting in Descending Order

How to merge and combine Excel spreadsheets into one
How to merge and combine Excel spreadsheets into one

To sort in descending order (Z to A or largest to smallest), select your data, click on 'Sort & Filter', then 'Sort Z to A'.

For instance, if you have a list of prices and you want to see the most expensive items at the top, use this method.

Sorting by One Column Then Another

How To Move Multiple Rows and Columns In Excel - The Easy Way!
How To Move Multiple Rows and Columns In Excel - The Easy Way!

Now, let's say you have a list of products with their categories and prices, and you want to sort this list first by category, then by price. Here's how:

1. Select the data you want to sort. Click on 'Sort & Filter', then 'Custom Sort'.

How to Add a Column in Excel Without Moving Data the Wrong Way
How to Add a Column in Excel Without Moving Data the Wrong Way
How to Transpose data from rows to columns in excel
How to Transpose data from rows to columns in excel
How to sort Rows horizontally left to right instead of Columns vertically top to bottom in Excel - PakAccountants.com
How to sort Rows horizontally left to right instead of Columns vertically top to bottom in Excel - PakAccountants.com
How to Select Non-Adjacent Columns in Excel
How to Select Non-Adjacent Columns in Excel
Excel Pro Trick: Combine Merge Multiple Columns into One Column with #Excel TOCOL Function Quickly
Excel Pro Trick: Combine Merge Multiple Columns into One Column with #Excel TOCOL Function Quickly
Sort data by color in Excel
Sort data by color in Excel
How to Sort in Excel Rows or Columns Avoid Sort Problems
How to Sort in Excel Rows or Columns Avoid Sort Problems
Autofit Rows and Columns in Excel with VBA
Autofit Rows and Columns in Excel with VBA
How to Rearrange Columns in excel quickly - Tamil
How to Rearrange Columns in excel quickly - Tamil
How to Use Columns Formula in Excel
How to Use Columns Formula in Excel
How to Sort Data in Excel Without Mixing Up Rows
How to Sort Data in Excel Without Mixing Up Rows
Auto adjust column using view code in Excel #excelshorts #ytshorts #shorts
Auto adjust column using view code in Excel #excelshorts #ytshorts #shorts
How to sort by multiple columns in Excel
How to sort by multiple columns in Excel
Excel Tricks: How to Freeze Rows or Columns in Excel
Excel Tricks: How to Freeze Rows or Columns in Excel
Sort Data with Button in Excel | Multi-Column Sorting with One Click
Sort Data with Button in Excel | Multi-Column Sorting with One Click
How to Hide Columns in Excel Without Deleting Data
How to Hide Columns in Excel Without Deleting Data
How To Sort Based on Multiple Columns in Excel
How To Sort Based on Multiple Columns in Excel
How to Split Text Data of a Cell to Column in Excel - ExcelDataPro
How to Split Text Data of a Cell to Column in Excel - ExcelDataPro
How to delete all blank columns in your worksheet at once using Go To Special. 🕺
How to delete all blank columns in your worksheet at once using Go To Special. 🕺

Sorting by Category First

In the 'Sort by' dropdown, choose the column you want to sort by first (in this case, category). Click 'OK'.

Your data will now be sorted by category. But what if you have multiple products in the same category, and you want to sort them by price? That's where sorting by another column comes in.

Sorting by Price Within Each Category

After sorting by category, select your data again. Click on 'Sort & Filter', then 'Custom Sort'.

In the 'Sort by' dropdown, choose the column you want to sort by next (price). Under 'Sort On', choose 'Values'. In the 'Order' dropdown, choose 'Smallest to Largest' or 'Largest to Smallest', depending on your preference. Click 'OK'.

Now, your data is sorted first by category, then by price within each category.

Mastering this technique will save you time and help you analyze your data more effectively. So, the next time you're working with large datasets in Excel, give it a try!