How to Sort by Month in Excel & Google Sheets

In this tutorial, you will learn how to sort by month in Excel and Google Sheets.

 

month text sorted by date initial data

 

Sort by Month as Text

Say you have the following list of months as text in Column B and want to sort them chronologically from oldest to newest.

 

month text sorted by date initial data

 

  1. Select a range with its header for sorting (B1:B10), and in the Ribbon go to Home > Sort & Filter > Custom Sort.

 

sort by month custom sort 1a

 

  1. In the Sort window, under Order, choose Custom List…

 

sort by month custom list

 

  1. In the Custom Lists screen, select January, February, March, … from the list on the left and click OK.

 

sort by month custom-list 2

 

  1. Now in the Sort window, under Order you have the custom list for months. Click OK.

 

sort by month custom sort 2

 

Finally, all months from Column B are sorted chronologically.

 

month text sorted by date 1a

 

Sort Dates by Month

Say you have a list of dates in Column B and want to sort them by month, regardless of year, from January to December.

 

sort dates by months initial data 1a

 

To achieve this, you’ll need to add one helper column.

  1. In cell C2, enter the formula:
=MONTH(B2)

 

sort dates by months formula 1a

 

The MONTH Function returns the number of the month based on a date input. In this case, the value of C2 is 2 (February).

  1. Position the cursor in the bottom right corner of cell C2, until the cross appears.

 

sort dates by months formula 2b

 

  1. Drag the formula down to the end of the range (C10).

 

sort dates by months formula 3b

 

  1. Now you have a month number for every date in Column B, and you can sort both columns based on Column C.
    Select the range in Column C (C1:C10). Then in the Ribbon, go to Home > Sort & Filter > Sort Smallest to Largest.

 

sort dates by months 1b

 

  1. In the pop-up window, choose Expand the selection, and click OK.

 

sort dates by months 2

 

As a result, both columns are sorted by the month number in Column C, and you can delete helper Column C. Dates in Column B are now sorted by month from oldest to newest.

 

dates sorted by months 1a

 

Sort Months as Text in Google Sheets

Since Google Sheets don’t have an option similar to Excel’s custom lists, you’ll have to use an array formula to sort months as text.

To do this, enter this formula in cell C2:

=SORT(B2:B10,MONTH(B2:B10&1),1)

 

google sheets sort months as text 1

 

In this case, the MONTH Function has a range, instead of a single value, as an input. This variant will return an array of numbers 1–12 (for each month) sorted in ascending order. As the SORT Function is the array itself, it will take the values from B2:B10 as an array and sort them accordingly from cell D2 downward. This way, you get all months from Column B, sorted in Column C from oldest to newest.

Sort Dates by Month in Google Sheets

To sort dates by month in Google Sheets, you can use the same option with a helper column and the MONTH Function as explained for Excel. The formula is nearly the same as the one in the previous step, which you used to sort months as text:

=SORT(B2:B,MONTH(B2:B) ,TRUE)

 

google sheets sort dates 1

 

The logic here is the same. The MONTH Function will sort dates in the range from oldest to newest, and the SORT Function will create a new array in Column C based on that list.