Although it may appear simple, sorting data by date in Google Sheets can be challenging when working with various date formats, particularly ones that incorporate time. Fortunately, Google Sheets has a variety of strong formulas that can assist you in precisely and quickly sorting your data.
This post will walk you through using formulas to sort data in Google Sheets by date.
Which date formats do Google Sheets support?
Different date formats used in Google Sheets for various purposes are:
Default Date Format: The normal choice for the spreadsheet determines the default date format used by Google Sheets. It usually follows the style used in the region you are in. For instance, the standard date format in the United States is MM/DD/YYYY (for instance, 01/15/2023).
Day-Month-Year Format: This arrangement, which is typically outside of the United States, shows the day before the month. It is written as DD/MM/YYYY (for instance, 15/01/2023).
Month-Day-Year Format: This format shows the month before the day, just like the standard format in the United States. It is written as MM/DD/YYYY (for instance, 01/15/2023).
Year-Month-Day Format: In this format, the year is shown first, then the month, and finally the day. It is written as YYYY/MM/DD, for example, 2023/01/15.
Custom Date Formats: One modifies date formats in Google Sheets in accordance with its unique requirements. For instance, write January 15, 2023, or one might shorten it to Jan. 15, 2023. Between the date components, one can also add separators like hyphens, slashes, or dots.
Date and Time Formats: Google Sheets has date and time forms in addition to date-only options. Along with the date, these formats allow for the inclusion of hours, minutes, and seconds, moreover depending on your preferences or unique data needs, the format may change.
What does Google Sheet’s Sort Function do?
The SORT function in Google Sheets helps users to sort the data in the specified range of more or more columns. When compared to manual sorting, it offers a versatile method for dynamically sorting data, saving time and effort.
The general syntax of using the SORT Function in Google Sheets is:
=SORT(range, column_index, sort_order1)
The explanation above syntax of using the SORT function is:
- Range: It specifies the range of the data which is supposed to sort
- Column_index: It defines the column index number according to which the specified data is supposed to sort
- Sort_order: By default, this function will sort the data in ascending order but one can manually set the sorting order by using True for ascending order and False for descending order
How to Sort by Date in Google Sheets using the Formula?
Sorting the data by date in Google Sheets using the formula is one of the easiest tasks. One can sort the data by following the mentioned-below steps.
Step 1: Determining the Range of Data
First, determine the range of the data which is supposed to be sorted by date, for example, in our example, the range is A3 to C7:
Step 2: Find the Date Column
Next, is to find the column containing the “Date” according to which the specified data will be organized. For example, we have column “C” which is containing the date:
Step 3: Apply the SORT Function
After determining the column of date, apply the “SORT” function in Google Sheets by following the mentioned syntax of the SORT function. In our case, the SORT function will be applied:
=SORT(A3:C7, C2:C7, True)
The range data has been sorted with respect to the “Date”:
Step 4: Format the Date Column (Optional)
This step is optional but can be used to change the format of the date. Choose the column containing the date, and then go to “Format”:
By clicking on the “Format”, a dropdown menu will appear from which click on the “Number” and then the format of date:
That’s it! The data in the specified range will be sorted based on the dates in the chosen column.
To sort by date in Google Sheets, the SORT function can be used by following the usage syntax of “Sort(range,column_index,sort_criteria)”. This post has explained the usage of the sort function to sort the data by date in Google Sheets.