How to Make Columns Sortable in Excel & Google Sheets

Written by

Mel Jenkins

Reviewed by

Laura Tsitlidze

Last updated on February 14, 2023

This tutorial demonstrates how to make columns sortable in Excel and Google Sheets.

 

columns sortable az

 

Sortable Headings in Excel

Excel has some great built in database features which make ordering and sorting data easy when your data is formatted as a table. This means that the data should be organized into columns that contain column headings in the first row, with the data contained in the rows beneath it.

Consider the data in the spreadsheet below.

 

columns sortable sales figures

 

Each column of data has a heading with the information contained in the rows below.

  1. With a cell within the table selected, in the Ribbon, go to Data > Sort & Filter > Filter.

 

columns sortable ribbon filter

 

  1. Notice that a small arrow appears to the right-hand side of each cell that contains the column headings. This indicates that a filter has been attached to each column.

 

columns sortable column filter

 

  1. Click the drop down for the column you wish to sort (in this case, Order Date), and then choose either Sort Oldest to Newest or Sort Newest to Oldest.

 

columns sortable order date sort

 

  1. The data gets sorted based on your choice, and you can see that the drop-down arrow has another little arrow to the right of it –either pointing downward (if you sort newest to oldest) or upward (if you sort oldest to newest).

 

columns sortable order date sorted

 

  1. Click back on the filter button in the Data tab on the Ribbon if you wish to remove the filter drop downs from the column headings.

Custom Sort

You can also use the Custom Sort feature to sort using your column headings.

  1. With your mouse clicked within the table of data, in the Ribbon, go to Data > Sort & Filter > Sort.

 

columns sortable filter sort

 

  1. Then in the Column Sort by drop down, choose the column header (field name) you wish to sort on.

 

columns sortable sort fields

 

  1. In the Order drop down, choose to sort Oldest to Newest, Newest to Oldest, or a Custom List.

 

columns sortable sort order

 

  1. Click OK to sort. (Make sure to keep rows together.)

Also see Sorting Data in Excel VBA and VBA AutoFilter to learn about filtering and sorting data with macros.

Sortable Columns in Google Sheets

You can also use a filter in Google Sheets to make your columns sortable. As with Excel, the data needs a heading for each column.

  1. Click within your data and then, in the Menu, go to Data > Create a filter.

 

columns sortable gs menu

 

  1. Then, click the filter arrow next to the column you wish to sort, and choose either Sort A→Z or Sort Z→A.

 

columns sortable gs filter

AI Formula Generator

Try for Free

See all How-To Articles