Members-only tutorial

Watch the video and get the practice sheet with membership.

See membership options

Ian Asks: How to sort dates by year/month (can't do with filter)

About this Tutorial

In Excel you actually have these options of sorting by year, by month, by date. But let's do it in Google Sheets.

Video Transcript

<div> Hey, this video is for Ian. He asks, um, how to sort Learn how to effectively sort your data in Google Sheets. Opens in new tab dates by your month when he has them, um, formatted like this, which, um, it's like the n date or the day of the month, uh, hyphen a, um, month, then hyphen then here, um, what he's having str trouble with his that in Excel Understand the differences between Google Sheets and Excel file formats. Opens in new tab . Basically, you can take, um, this data Explore data management techniques in Google Sheets. Opens in new tab here, do a filter Discover how to use filters to organize your data. Opens in new tab .<br><br>and in Excel Understand the differences between Google Sheets and Excel file formats. Opens in new tab you actually have these options of sorting by year, by month, by date.

Um, there's a, um, other types of things you can sort by Find out how to sort your data by specific criteria. Opens in new tab , but in Google Docs, as you can see, you need to select Learn about using query select clauses for data manipulation. Opens in new tab each and every different, um, date and year and month, and you can't sort Learn how to effectively sort your data in Google Sheets. Opens in new tab it by month. So this is a little bit of a workaround.<br><br>May not work for everyone. But at least you'll learn about, um, month, year in day formulas and how they work.

And then, um, show you one pitfall, uh, two potential other ways you or not other ways, uh, something you can do on top of this, which with, uh, array formula Understand the use of array formulas for efficient data processing. Opens in new tab , but you might, uh, run into some pitfalls or challenges with that.<br><br>And you can even reformat the dates here. I'll share Learn how to share your Google Sheets with others. Opens in new tab that with you as well. First off, um, we want to be able to sort by Find out how to sort your data by specific criteria. Opens in new tab month, for instance. Um, you can convert the month. And actually this, uh, let me turn off the, uh, filter Discover how to use filters to organize your data. Opens in new tab . So this. Date, Google Sheets does look at it as a date.

It understands that this is, um, the date, uh, the month and the year.<br><br>Um, it, you can use the month. So we literally just go equals month. And in parentheses, we, b2, put B2 and we just copy and paste that down the ro uh, column. And you can get the number Explore number formatting options in Google Sheets. Opens in new tab of the month. And, and this is sortable. So what you can do is essentially if you wanna sort Learn how to effectively sort your data in Google Sheets. Opens in new tab this data Explore data management techniques in Google Sheets. Opens in new tab , say in column A, you have these dates, you can create these other, uh, columns and absolutely this is not the best solution.<br><br>If you are trying to keep your, uh, data Explore data management techniques in Google Sheets. Opens in new tab lean. You're trying to show this off to other people.

But also, honestly, this is a really quick way to sort Learn how to effectively sort your data in Google Sheets. Opens in new tab this, um, in this way. Um, If you just need to sort Learn how to effectively sort your data in Google Sheets. Opens in new tab it real quick, um, just type in month and put in the, uh, in the parenthesis the cell that you're trying to convert to month and it gives you this number Explore number formatting options in Google Sheets. Opens in new tab .<br><br>And here you can sort Learn how to effectively sort your data in Google Sheets. Opens in new tab the whole sheet by. , you can sort sheet Get tips on sorting entire sheets in Google Sheets. Opens in new tab by Z to A Learn how to sort your data from Z to A. Opens in new tab and everything sorts perfectly. Um, you can do that with year as well. You literally, it is equals year. And then in parentheses you put b2, whatever cell you're trying to, um, do.

And you can also grab the day too with just day, uh, with b2.<br><br>And now you have this, um, day, year, month, and you can sort Learn how to effectively sort your data in Google Sheets. Opens in new tab these, you know, move these around as however you want. Um, reformatting the date doesn't solve the issue. Uh, it merely just makes it reformatted. I just reformatted it. So literally all I did was put equals B two and then copied and paste it here.<br><br>And what I did is I went to format Discover various formatting options for your data. Opens in new tab .&nbsp; went to number Explore number formatting options in Google Sheets. Opens in new tab , um, more formats Explore advanced formatting options in Google Sheets. Opens in new tab , more Dayton time formats. And here's a bunch of ways you can format Discover various formatting options for your data. Opens in new tab it. Um, but it doesn't change the issue.

You still have, um, Google Sheets still gives you the exact same problems, um, can change it to, let's do this, let's change it to that.<br><br>Let's change day 2, 0 5 month to, I like adding the leading zeros Learn how to add leading zeros to your numbers. Opens in new tab . Makes it easy to read sometimes.&nbsp; can copy and paste that down and we can see the same problem exists if we turn on the filter Discover how to use filters to organize your data. Opens in new tab and we have the dates exactly the same thing, right? So this solution of the of. I don't know what to call it.<br><br>Parsing out the day, month, year is one solution to your exact problem.

What might happen though is like if you have thousands o of these dates that you need to sort Learn how to effectively sort your data in Google Sheets. Opens in new tab real quick, um, or at least like look through, you might think, oh, you might think this is a solution, and I'll share Learn how to share your Google Sheets with others. Opens in new tab and I'll share Learn how to share your Google Sheets with others. Opens in new tab with you what the problem is.<br><br>You might say, okay, let me just do array formula Understand the use of array formulas for efficient data processing. Opens in new tab .&nbsp; here. And instead of b2, let's do b2 colon B for the entire, um, thing. We'll delete this and now you'll have your dates and you can add as many dates here.

This column will always be the day, and it's only one, um, formula Understand the syntax used in Google Sheets formulas. Opens in new tab here, so you don't need to type or, or copy paste this anywhere.<br><br>Here's the issue though. Now you can't sort Learn how to effectively sort your data in Google Sheets. Opens in new tab it. If you sort Learn how to effectively sort your data in Google Sheets. Opens in new tab . Um, let's see, let's, let's do this. If I sort Learn how to effectively sort your data in Google Sheets. Opens in new tab z to a Learn how to sort your data from Z to A. Opens in new tab , what it's actually going to do is sort Learn how to effectively sort your data in Google Sheets. Opens in new tab it and it's gonna move this one with the formula Understand the syntax used in Google Sheets formulas. Opens in new tab down to here. And now it's like in reverse&nbsp; and everything disappears. Um, so it knows the data Explore data management techniques in Google Sheets. Opens in new tab immediately, but then this array formula.<br><br>Is now here and it's like, oh, it, it doesn't know what to do until you lost all of your data here.

Um, we'll just come command, see that. So while, uh, array formula Understand the use of array formulas for efficient data processing. Opens in new tab does work to get you that information, it doesn't work well with sorts. So if you're literally trying to sort Learn how to effectively sort your data in Google Sheets. Opens in new tab , you cannot use a Ray formula Understand the syntax used in Google Sheets formulas. Opens in new tab in this case.<br><br>Um, unless. , you don't mind this breaking. So what's interesting about that is that the only thing that breaks is this sea column. But if literally the only thing you want to do is sort Learn how to effectively sort your data in Google Sheets. Opens in new tab it real quick.&nbsp; and you don't want to copy and paste these, uh, formulas all the way down.

Then actually this does work for that specific situation.<br><br>Um, and that's really exciting. You only have to remember to do array formula Understand the use of array formulas for efficient data processing. Opens in new tab around the day and put the form the column here. You get it, sort Learn how to effectively sort your data in Google Sheets. Opens in new tab it done, delete that column, and you're done. And you've crunched your data Explore data management techniques in Google Sheets. Opens in new tab . You've, you've done some data Explore data management techniques in Google Sheets. Opens in new tab Ming, you've sorted your sheet and you're done. It just doesn't work.<br><br>If you wanna sort Learn how to effectively sort your data in Google Sheets. Opens in new tab it a couple ways, couple different ways, and you have to redo Find out how to redo actions in Google Sheets. Opens in new tab the array formula Understand the use of array formulas for efficient data processing. Opens in new tab , it's very complicated. So hopefully this helps you out.

Hopefully this helps Ian out with his issue of, of trying to sort Learn how to effectively sort your data in Google Sheets. Opens in new tab this. Um, I know it's not exactly the best situation of like, you can't really just go here, click and filter Discover how to use filters to organize your data. Opens in new tab .<br><br>Um, . And unfortunately, you know that that's a, it's not a bug, it's a feature. Um, you get to keep your data Explore data management techniques in Google Sheets. Opens in new tab as you wish, and it's not filtered and, and Excel Understand the differences between Google Sheets and Excel file formats. Opens in new tab excels at that, um, one feature, but at least you have some way of getting around it right now. Um, you can create this day, month, year, columns and sort Learn how to effectively sort your data in Google Sheets. Opens in new tab as you wish, and then you have these sorted done.<br><br>Have a great one.</div>