Google Sheets, Microsoft Excel, and other spreadsheet software offer powerful sorting tools to help you rearrange your data. Knowing how to sort your spreadsheets makes the data easier to see and use. You'll see the latest or oldest items at the top of your dataset when you sort by date.

Whether you work on a PC or one of the best high-end Chromebooks, this article explores the different methods for sorting a dataset by date in Google Sheets.

Sort by date using the sort range tool

The quickest and easiest way to sort dates in this Google Workspace app is to use the sort range functionality. It shuffles the original dataset in the order you want.

Here's how it works on any desktop device, be it a Chromebook or a Windows PC:

  1. Highlight the relevant data fields. This might include dates, names, and other data alongside their headings.
    A range of data selected in Google Sheets
  2. Open the Data menu and choose Sort range > Advanced range sorting options.
    The Data and Sort range menu items in Google Sheets
  3. Select the checkbox next to Data has header row if you highlighted the headings. Otherwise, leave this unchecked.
  4. Next to Sort by, choose the sort column (it's Birthdays in this example, but it might be called Column A for you, depending on your selection).
    The Google Sheets sort range prompt
  5. Keep the default sort option of A to Z to sort the dates in ascending order (earliest to latest), or pick Z to A to sort by descending order (latest to earliest).
  6. Select the Sort button to automate the sorting order by the date column you chose.
    A column of dates sorted by oldest to newest in Google Sheets

Create a backup before sorting to preserve the original dataset.

Sort by date using the sort function

The sort range method is a great option for one-time sorting. It isn't helpful if you plan to add additional rows of data later or don't want to modify the original cells. For that, use the sort function, which can be edited over time as you expand your dataset.

Here's how to use the sort function in Google Sheets:

  1. Open the sheet with the dataset to be sorted.
  2. Choose where the sorted data should go. This can be anywhere as long as the space below the cell doesn't have data. Our example shows that we chose D2.
  3. Enter =SORT(A2:B10,1,TRUE) into the cell, but replace A2:B10 with your data range. 1 is our date column (yours might be different), and TRUE is used to sort in ascending order (write FALSE for descending order).
    An example of the sort function used on dates in Google Sheets
  4. Press Enter to start the sort function.

The advantage of the sort formula is that it supports automatic updates to the sorted data when the original is changed. For example, editing Alexis Love's birthday alters the sort function's results to reorder the list as necessary. This is indispensable for spreadsheets that need to support changes.

Changes made to a Google Sheets document to show updated entries

Similarly, you can add additional rows to the original dataset. Then, all you do is modify the formula to include those additional lines, and the result updates to reflect the new information.

The sort function only works if the output space doesn't include data. If those cells are occupied, you get a #REF! error. To fix this, erase the existing data under the formula to make room for the result or insert a fresh column.

Check the validity of the date format

For the date sort function to work, Google Sheets needs to recognize your values. If you have invalid dates (in an unsupported format), those cells are read as plain text, giving incorrect results. You can confirm that your dates are in the proper format visually or with a formula.

Check the alignment

When text is written in Google Sheets, it's aligned to the left. Numbers do not follow this rule and are positioned on the right side of the cell.

A date formatted as text in Google Sheets

If the dates are aligned to the left, they're likely in an incorrect format. Generally, entering the date in full (for example, May 5, 2022, or 5 May 2022) is valid. Divide the numbers with a slash or hyphen in the following format: MM/DD/YYYY or MM-DD-YYYY.

Use the DATEVALUE function

Checking whether your dates are right-aligned is usually enough to determine if they're valid. If the data spans the cell width, it can be challenging to discern the alignment. The other way to investigate this Google Sheets problem is to use the DATEVALUE function.

In an adjacent column, enter =DATEVALUE(A2:A) into the cell, using your data range in place of ours. Press Enter to see which cells have valid dates and which are read as text.

The datevalue function in Google Sheets

In our example, the function returns real values for most of the dates. The #VALUE! error indicates those cells aren't formatted correctly. The first has a rogue period, and the other is misspelled.

Sort your Google Sheets spreadsheets like a pro

Organizing data is crucial, especially when dealing with large volumes from diverse sources. Sorting by date can make comprehending your data and extracting meaningful insights easier. Google Sheets doesn't only support date sorting. You can also sort plain text in alphabetical order. For more tutorials like this, check out these top Google Sheets tips and tricks.