Just like alphabets and numbers, dates can also be sorted from earliest to latest and vice-versa.
In Google Sheets this can be done with the built-in sort function, which allows users to sort a dataset.
However, unlike numbers and alphabets, some date formats are unsupported, and may lead to errors when you try to sort by date in Google Sheets.
Sort by Date in Google Sheets
Before you proceed forward with sorting a Google Sheets spreadsheet by date, you need to ensure that your dataset has the correct date formats.
You can do this by seeing how the dates are aligned. If Google Sheets recognizes the date, it will align it to the right of the column, whereas if it doesn’t recognize the format, it will align the date to the left of the column.
To confirm whether your dates are valid or not, you can use the =DATEVALUE function. If this function returns a number, it indicates the date is valid.
If the function returns #VALUE it indicates that the provided date is invalid and will be excluded from the sorting function.
Once you have verified that the dates are valid, you can proceed with the detailed steps to sort Google Sheets by date.
1. Select Dataset
The first thing you want to do is select the entire dataset you want to sort, including column headings. If there is an index column, leave that unselected since it will throw off the index numbers.
You can quickly select the entire dataset, by clicking on a cell in the dataset and then pressing the Ctrl + A keys (Command + A for Mac users).
2. Navigate to Data > Sort Range > Advanced Range Sorting options
Once the dataset is selected, click on the Data tab from the top menu.
In the dropdown, select Sort Range > Advanced Range Sorting options
3. Choose Sorting Options and Sort Date
You will now see a pop-up box which has a bunch of sorting options. The next step is to choose which sorting options you would like.
If your data has a header row, select the Data has header row option.
Next in the Sort by dropdown, select the date column you want to sort by.
Lastly choose the sort order you want. A-Z will sort from oldest to newest date, while Z-A will sort from newest to oldest date.
Once you have chosen your sorting options, click on the Sort button to sort your dataset.
The dataset will now be sorted by date, as you can see below.