Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Sorting Dates by Month.

Sorting Dates by Month

by Allen Wyatt
(last updated June 22, 2015)

4

There may come a time when you have a need to sort a list of information based on the month represented in a particular column. For instance, you may have a list of people and their birthdays, and you want to sort the list by birthday month so that you know whose birthdays occur within a particular month.

The easiest way to do this is to add a new column to your table. This column will be named something descriptive, such as "Birth Month" or simply "Month." For instance, let's say that you have people's birthdays in column B, you could add the new column in column C. In this column you could then use the MONTH function, as follows:

=MONTH(B3)

This particular formula would go in cell C3, but similar formulas would go in each cell of column C. The result is that column C will contain numbers ranging between 1 and 12, representing to birth months of the people. You can now sort the list based on the contents of column C, with the result that the list is sorted by month.

This approach works fine, but you may not be able to add another column to your worksheet. If this is the case, you can follow these steps to sort by month:

  1. Select the cells in column B (assuming that column B contains the birthdates).
  2. Press Ctrl+Shift+F. Excel displays the Format Cells dialog box.
  3. Make sure the Number tab is displayed. (See Figure 1.)
  4. Figure 1. The Number tab of the Format Cells dialog box.

  5. In the Category list, choose Custom.
  6. In the Type box, enter four lowercase Ms (mmmm) for the format.
  7. Click on OK. The cells in column B should now show only the birth month of the people in your list. (Don't worry; the underlying birthdates are still there.)
  8. Select your entire list.
  9. Display the Data tab of the ribbon.
  10. Click Sort in the Sort & Filter group. Excel displays the Sort dialog box. (See Figure 2.)
  11. Figure 2. The Sort dialog box.

  12. Use the controls in the dialog box to specify that you want to sort by the contents of column B.
  13. Use the Order drop-down list to choose Custom List. Excel displays the Custom List dialog box.
  14. From the available custom lists, select the one that lists months and then click OK.
  15. Click on OK to close the Sort dialog box and actually sort the list.

You may be wondering why you need to reformat the display of the cells containing the birthdates (steps 1 through 6). The reason is that when you finally sort your list (steps 7 through 13), if you simply have the original full dates displayed, Excel will effectively sort the list chronologically rather than by month.

There is an additional way you can approach the problem. This involves actually converting the dates into text (instead of the internal serial numbers), as follows:

  1. Select the cells that contain the dates.
  2. Press Ctrl+Shift+F. Excel displays the Format Cells dialog box.
  3. Make sure the Number tab is selected.
  4. In the list of Categories, choose Date.
  5. In the list of Types, choose March 14, 1998.
  6. Click on OK. Your cells should now be formatted to show a long date with the month first.
  7. Press Ctrl+C. This copies the cells to the Clipboard.
  8. Open Notepad.
  9. Press Ctrl+V. The information is now pasted into Notepad, and should still be the long dates.
  10. Select the information just pasted into Notepad.
  11. Press Ctrl+C. This copies the information to the Clipboard.
  12. Switch back to Excel.
  13. Press Ctrl+Shift+F. Excel displays the Format Cells dialog box.
  14. Make sure the Number tab is selected.
  15. In the list of Categories, choose Text.
  16. Click on OK.
  17. Press Ctrl+V.

Your dates are now pasted into Excel as true text entries, not as dates. This allows you to easily sort the information according to the month in the date.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9728) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Sorting Dates by Month.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Using Object Anchors

An object anchor is used to signify the point at which an object is inserted into a document. If you want to see these ...

Discover More

Sorting Files

The Open dialog box allows you to sort the files it presents to you. How you do the sorting depends on the version of Word ...

Discover More

Embedding an Excel Chart in a Word Document

As components of the Microsoft Office suite, one would expect Excel and Word to work together. One of the most common tasks ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Recognizing a Header Row when Sorting

When you sort data in a worksheet, there are a couple ways you can do it. Using the simple way can result in unsatisfactory ...

Discover More

Sorting an Entire List

Need to sort all the data in a table? Here's the fastest and easiest way to do it.

Discover More

Sorting ZIP Codes

Sorting ZIP Codes can be painless, provided all the codes are formatted the same. Here's how to do the sorting if you have ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 8Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is three more than 5?

2016-09-21 00:26:42

Lisa

This was a fantastic tip. I ended up creating 2 additional columns and left the original as is (just incase I broke it) and followed instructions above to create 2 separate columns: 1) month and 2) day of the month.

That way, the dates can filtered the birth month column and sort by the day of the month column.

Did this on excel for Mac.

thank you.


2016-02-19 13:57:19

Alicia

Worked great for me. Saved me a LOT of time!

Thanks


2016-01-06 10:33:56

Jane

This is a ridiculously convoluted process that is still sorting my list by the YEAR, even though I have the year in a different column. Score another "lose" for the pc, I'll take the Mac any day.


2014-09-24 05:29:34

Stephen Njue

Excellent it resolved my problem


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.