HomeGoogle DocsSpreadsheetFormula to Sort By Month Name in Google Sheets

Formula to Sort By Month Name in Google Sheets

Published on

Sort by month name is not new to Excel users as there is a custom sort option in Excel. In Google Sheets things are different. To sort by month name in Google Sheets, you must use a custom formula.

I have a list in Google Sheets that contains a column with month names that in the text format.

Ironically that column is not sorted in chronological order. See that list in Column A below and the sorted list in column D.

example to sort by month name in Google Doc

It’s possible to sort month names in chronological order as above in Google Sheets using the SORT or SORTN function. In this tutorial, I am using the SORT.

As you may know, by default, if you use the SORT menu or SORT formula, you can only sort your list in ascending (A-Z) or descending (Z-D) order.

Let me show you how to tweak the SORT function to sort a column that contains month names in text format.

How to Sort By Month Name in Google Sheets

The above month names are in unsorted order in the range A2:A13. Here is the formula that I’ve used in cell D2 to sort by month names.

Example 1:

=sort(A2:A13,month(A2:A13&1),1)

Formula Explanation Part

The MONTH function within the SORT populates the numbers 1 to 12 in the order as per the month names in A2:A13.

I am taking out the above MONTH formula and entering it in a separate cell to show you the output.

As you may know, when you use the MONTH function independently in a range, you should use the ARRAYFORMULA. But within SORT it’s not necessary as SORT itself is an array formula.

how to SORT month in text to month order

So here is the generic version of the above formula that I have used to SORT by month name in Google Sheets.

SORT(range, sort_column/sort range outside of 'range', is_ascending)

In this;

range = A2:A13

sort range outside of ‘range’ = month(A2:A13&1)

is_ascending = 1 (TRUE)

Example 2:

Here is one more example and in this more columns are involved. The formula is the same, just change the range in the formula.

sort month names in chronological order

That’s all. This way you can sort your data by month name in Google Sheets. Enjoy!

More Resources:

  1. Google Sheets Query: How to Convert Month in Number to Month Name in Text.
  2. The formula to Convert Month Name in Text to Month Number in Google Sheets.
  3. Convert Numbers to Month Name in Google Sheets.
Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Creating Sequential Dates in Equally Merged Cells in Google Sheets

Do you know how to create sequential dates in equally merged cells across a...

Running Total By Month in Excel

This tutorial demonstrates how to calculate the running total by month in a range...

SORT and SORTBY – Excel Vs Google Sheets

While Excel offers the SORT and SORTBY functions for sorting a table, Google Sheets...

Get Top N Values Using Excel’s FILTER Function

When using the FILTER function in Excel to extract the top N values, it's...

More like this

Creating Sequential Dates in Equally Merged Cells in Google Sheets

Do you know how to create sequential dates in equally merged cells across a...

Interactive Random Task Assigner in Google Sheets

You have multiple tasks and multiple people. Here's a fun way to randomly assign...

Google Sheets Bar and Column Chart with Target Coloring

To color each data point in the column or bar chart according to the...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.