Have you ever wondered how to sort by date in Google Sheets? Sometimes, viewing your Google Sheets data according to its chronological order can make your work more efficient. This is especially true for datasets like registration dates, task deadlines, and salary trackers. To quickly do this, open your Google Sheets spreadsheet and click โDataโ > โSort sheetโ > โSort sheet by column Xโ (your date column).
Iโll talk more about this method in the sections below, together with how to sort by date in Google Sheetsย using filters, the sort range option, and the SORT formula. Iโll also give you some tips on how to prepare your data before sorting.
This Article Covers:
Preparing Your Google Spreadsheet for Sorting
Before sorting your spreadsheet, itโs important that you validate cell entries first. In this case, you must check whether Google Sheets recognizes the dates included as valid dates instead of ordinary text strings.
1. Validate the Data
Dates should be flushed to the right by default โ itโs likely to be in the wrong date format otherwise. You can confirm this by using the data validation feature in Sheets.
- Open your Google Sheets spreadsheet and select the range you want to validate (e.g., the date column).
- Click โDataโ in the Google Sheets menu bar and choose โData validation.โ
- Alternatively, right-click your selected range and choose โView more cell actionsโ > โData validation.โ
- This will open the โData validation rulesโ panel at the right.
- Choose โAdd rule.โ
- Open the drop-down menu under โCriteriaโ and select โIs valid date.โ
- If you want to customize your settings, you can choose to have Google Sheets show a warning or reject the input under โAdvanced options.โ
- Click โDone.โ
As you can see from my example, each cell entry in your given range that isnโt a valid date will have an error message or a red flag. Just change it to the proper format before moving on to the sorting process.
Alternatively, you can use the DATEVALUE function, which displays a numeric value on your spreadsheet. From my example below, if you see a โ#VALUE!โ error message, thereโs something wrong with that cell entry.
Aside from the DATEVALUE function, consider entering your dates into the spreadsheet with the DATE functionย to ensure correctly sorted data.
2. Freeze the Column Headers
If youโre using headers on your spreadsheet, ensure the column header row is frozen before sorting. This way, they wonโt be sorted in the range. To do this, follow the easy steps Iโve included below.
Right-click the first row and choose โView more cell actionsโ > โFreeze up to row 1.โ
With your data ready (and maybe timestamped), itโs time to answer the million-dollar question: โHow do you sort by date in Google Sheets?โ
How To Sort by Date in Google Sheetsย in 4 Ways
Here are four simple guides on how to sort a Google Sheet by date. While theyโre easy to apply, choose whichever method works the most efficiently for you.
1. Use the Sort Sheet Option
The sort sheet option is my favorite method because it allows you to rearrange multiple columns according to dates. I often use this method when I have sets of related data that I donโt want jumbled and to result in errors. Hereโs how to sort by date in Google Sheets without mixing data:
- Click a cell under the date column on one of your Google Sheets spreadsheets.
- Choose โDataโ > โSort sheet.โ
- Click โSort sheet by column X (A to Z)โ to show the earliest date first.
- If you want to show them from the latest date first instead, pick โSort sheet by column X (Z to A).โ
After doing the steps above, you will now have your data sorted data, similar to my example below:
2. Access the Sort Range Option
Another popular method that I often use is when I want to narrow down my sorting. Hereโs how I would organize Google Sheets by date using the sort range functionality:
- Select the columns and rows that you want to sort.
- Click โDataโ > โSort rangeโ > โSort range by column X (A to Z).โ (I often select the option to sort my data in descending order, but thatโs a personal preference. Feel free to arrange your data according to your preference.)
As you may have noticed, Google Sheets automatically chooses the first column as the sorting basis in this method. If you want to use a different column, you must access the sort range tool. Follow my guide below on organizing by date in Google Sheets with advanced range sorting options.
- Choose sort range and click โDataโ > โSort rangeโ > โAdvanced range sorting options.โ
- This will open the sort range dialog box on your screen.
- If you included the header row in your selected range, tick the option for โData has header row.โ
- Pick your date column in the โSort byโ drop-down menu.
- Pick how to sort your data in ascending or descending order.
- If you want to use an extra sorting column, click โAdd another sorting columnโ and set it up accordingly.
- Click the โSortโ button to finish.
And there you have it! These advanced sorting options allow you to use multiple columns as sorting bases. Additionally, if you have two columns โ one for names and another for dates โ that you want to sort, Google Sheets will rearrange your data according to names first, then the date column accordingly.
3. Set Up the SORT Function
In the previous two methods that I have discussed, they only let you sort your data once. This means you need to repeat the process to sort them again if there are changes in the adjacent columns.
A convenient workaround is learning how to dynamically sort Google Sheets by date using the SORT function. It also lets you use multiple sorting columns.
The SORT function uses the following syntax:
SORT(range, sort_column, is_ascending, [sort_column2, is_ascending2, ...])
- range refers to the selected cells that you want to sort.
- sort_column is the basis for the sorting.
- is_ascending accepts TRUE or FALSE to determine whether or not you want your data to be sorted in ascending order.
- The parameters in brackets allow you to add another sort column, which is optional.
Hereโs how I would sort my data by date in Google Sheets using the SORT formula:
- On a separate column, select the cell adjacent to the first data entry on your spreadsheet.
- Type โ=SORT(โ as a starting formula.
- Indicate your cell range and column separated by commas.
- Enter either โTRUEโ or โFALSEโ for the is_ascending parameter.
- Optionally, add another sort column in the same format.
- Type โ)โ to finish the function.
- Press โEnterโย or โReturnโย on your keyboard to finish.
4. Google Sheets Filter by Date Workaround
Another way you can set up dynamic sorting on Google Sheets is to create filters. While this method is convenient, the downside is that you can only use a single column for sorting. Let me show you a quick example in the guide below on how to sort columns by date in Google Sheets with filters:
- Select your sorting range.
- Go to โDataโ and select โCreate a filter.โ
- Alternatively, right-click your selected sorting range and choose โCreate a filterโ from the context menu.
- Click the filter icon for the column with your dates.
- Select your preferred sorting order, either โSort A to Zโ or โSort Z to A.โ
If you want to delete the filters applied at a later time, select one of the header rows and go to โDataโ > โRemove filter.โ You can use the context menu (right-clicking a filter header).
Avoid These Mistakes When Sorting by Date in Google Sheets
Speaking from first-hand experience, itโs hard to sort data when it isnโt properly formatted. There will always be errors popping out from nowhere.
Below, I have listed a few common mistakes that might hinder Google Sheets from sorting data by date functionalities. Make sure to check for these errors before following my guides on how to order by date in Google Sheets.
- Blank cells:ย A blank cell can be detected as the earliest date in your spreadsheet, so removing it would be necessary. Alternatively, you can opt to use the sort sheet option in ascending order (A to Z). This way, the blank cells would be sorted at the bottom.
- Lack of consistency: As much as possible, keep the formatting for your dates similar. For example, if you used the format MM/DD/YYYY, you must use the same for all other dates on your sheet. This way, sorting data in Google Sheets would proceed without hassle.
- Wrong formatting: As mentioned before, the dates may actually be entered as ordinary text strings instead of โDateโ data. Make sure to use data validation to weed out those included in an incorrect date format.
To avoid these mistakes, using the preparation tips I discussed before sorting data is best. This way, you wonโt have difficulty checking your spreadsheets for errors. It also allows you to ensure that your sorted data is accurate.
Frequently Asked Questions
Can You Sort Rows by Date in Google Sheets?
Yes. You can sort rows by date in Google Sheets using the SORT function or the Sheets built-in functions for sorting. Filters work for sorting by date, too. Meanwhile, if referring to horizontal sorting, consider transposing your data before the sorting process.
Why Canโt I Sort by Date in Google Sheets?
Something might be wrong with the data youโre trying to sort. Consider using the data validation feature in the โDataโ tab to check for invalid dates. Ensure the dates follow the same structure (e.g., MM/DD/YYYY).
How Do I Sort By Date MM/DD/YYYY in Google Sheets?
Convert your dates to the MM/DD/YYYY structure first and freeze the header row (if applicable). Select the dates and go to โDataโ > โSort sheetโ > โSort sheet by column X (A to Z).โ Alternatively, use the SORT function.
Working With Dates in Google Sheets
Certain datasets are best examined from the oldest to the newest. Thatโs why learning how to sort by date in Google Sheets is necessary. I have shown you four easy ways in this guide: sorting the whole sheet, using the sort range tool, creating filters, and configuring the SORT function. I hope they have been helpful and meet your sorting needs!
If youโre looking to upskill your Google Sheets knowledge, then take a look at this helpful Google Sheets beginner course. It covers all the basics, including how to enhance your spreadsheets, using different types of cell references, creating flexible formulas, and sorting and filtering your data.
Related: