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.

UNIQUE Function in Visible Rows in Google Sheets

The UNIQUE function doesn't inherently include only visible rows when it returns values, discarding...

Customizing Alternating Colors of a Table in Google Sheets

Google Sheets' new table feature offers limited options for customizing colors. While you can...

Structured Table References in Formulas in Google Sheets

When you create a Google Sheets table by inserting custom tables or converting a...

Converting a Range to a Table and Vice Versa in Google Sheets

Google Sheets has recently introduced several features, with one of the latest being the...

More like this

UNIQUE Function in Visible Rows in Google Sheets

The UNIQUE function doesn't inherently include only visible rows when it returns values, discarding...

Customizing Alternating Colors of a Table in Google Sheets

Google Sheets' new table feature offers limited options for customizing colors. While you can...

Structured Table References in Formulas in Google Sheets

When you create a Google Sheets table by inserting custom tables or converting a...

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.