How to Sort a Table by Date in Google Sheets Without Errors

How-to basics · Updated November 3, 2026

How to Sort a Table by Date in Google Sheets Without Errors

To sort a table by date in Google Sheets, select the whole table, choose Data > Sort range > Advanced range sorting options, mark whether the range has a header row, and sort by the date column from A to Z for oldest first or Z to A for newest first. Sorting the entire range keeps each date matched to its row; first check that Sheets recognizes the entries as dates, not text.

What You’ll Need

  • A Google account with access to the spreadsheet, opened in Google Sheets in a web browser.
  • A table with one date column and the related information arranged in rows and columns.
  • Permission to edit the spreadsheet. If you only have view access, ask the owner for editing permission or make an authorized copy.

Before you begin, identify the table’s first and last rows and columns. If the table contains a title above its column headings, keep that title outside the sort range. Sorting changes the order of rows, so make sure you are working with the intended data.

Step-by-Step

  1. Check that the dates are real dates. Click a few cells in the date column. A date can look correct but be stored as plain text, in which case chronological sorting may put it in the wrong position. One clue is alignment: numbers and dates usually align to the right by default, while text often aligns to the left, though manual formatting can change alignment. You can also select a date cell and look at the formula bar. If Sheets recognizes it as a date, changing its display format through Format > Number > Date should show a date style. If it stays as text or displays unexpectedly, see Troubleshooting before sorting.
  2. Select the full data range. Click the first cell in the table, then drag to the last cell so the selection includes every column that belongs to the same records. For example, if dates are in column A and names, notes, and amounts are in columns B through D, select all four columns across the data rows—not just the dates. You can also click the first cell, hold Shift, and click the last cell. Check the highlighted outline: it should cover the headings and every row you want to reorder, while leaving unrelated content outside it.
  3. Open the range-sorting controls. With the table selected, choose Data > Sort range > Advanced range sorting options from the menu bar. The advanced options let you identify a header row and choose a specific column, which is useful when the table has several fields. If you see a simpler sort command, avoid using it until you have confirmed it will sort the whole table rather than only the date column.
  4. Tell Sheets whether the range has headings. In the sort options, select Data has header row if the first row in your selected range contains labels such as Date, Customer, or Status. This keeps those labels at the top instead of treating them like data. If you selected only data rows and left the headings out of the range, leave the option unchecked. When in doubt, cancel and review your selection before continuing; an incorrect header setting can make a heading move into the records.
  5. Choose the date column as the sort key. In the Sort by menu, pick the heading for your date field if you marked that the range has a header row. Otherwise, choose the column letter that contains the dates. Confirm that you chose the correct date field, especially if the table has more than one date column, such as Order Date and Delivery Date. For a basic chronological sort, you only need this one sort rule.
  6. Choose the order and apply it. Select A to Z to put the earliest date first, moving forward in time. Select Z to A to put the latest date first. In Sheets, these labels describe ascending or descending order; for recognized dates, they sort chronologically rather than alphabetically by how the date is written. Click Sort to apply the change. Review the first and last few rows to confirm that the order matches what you intended.
  7. Confirm that each record stayed together. Pick a row you can recognize and check that its date still matches its name or other details. If the date column changed order but the other columns did not move with it, undo immediately with Ctrl+Z on Windows or Command+Z on Mac, then select the entire table and repeat the sort. Avoid editing the sheet between the mistaken sort and undo, since that can make it harder to restore the previous arrangement.

For a table you sort repeatedly, you can also use a filter. Select the table, choose Data > Create a filter, then use the filter icon in the date column heading to choose a sort order. A filter sorts the table’s rows together and makes later sorting convenient. If the spreadsheet is shared and you do not want to change the order other people see, consider a filter view through Data > Filter views, when available in your Sheets interface.

Common Mistakes

  • Selecting only the date column. This sorts dates without moving the rest of each record, leaving names, amounts, or notes attached to the wrong dates. Select the full table before using the sort-range command.
  • Including unrelated cells. A selection that extends into another table or includes stray values can sort those cells too. Keep the range tightly around the records you want to reorder.
  • Forgetting the header setting. If a heading is included but not identified as a header, it may be sorted among the dates. If the first selected row is data but is marked as a header, that record will be left out of the sort.
  • Assuming every date-looking value is a date. Text such as 04/05/2026 can be ambiguous: it might mean April 5 or May 4, depending on the spreadsheet’s locale. Mixed text and date values can sort unpredictably.
  • Sorting the wrong date field. Check the column heading in the sort dialog. A table with both an entry date and a due date can look plausible even after the wrong one was sorted.

Tips

  • Use a consistent date format. Select the date column and choose Format > Number > Date to apply a standard date display. Formatting affects how valid date values appear, but it does not necessarily convert text entries into dates.
  • Make the table easy to select. Keep one header row, avoid blank rows inside the data, and do not merge cells across records. A continuous rectangular range is easier to sort reliably.
  • Choose order based on the task. A to Z is helpful for finding the oldest overdue items; Z to A puts recent activity at the top. Neither choice changes the underlying dates, only their row order.
  • Use a filter for ongoing work. A filter lets you sort from the column heading without reopening the advanced range dialog. Remember that anyone with access to the regular filter may see the shared sheet’s rows rearranged; filter views are better when people need separate views.
  • Protect important work first. If the current order is meaningful, make a copy of the sheet or confirm that version history is available before a major reorganization. Sorting is easy to undo immediately, but a backup offers another way to recover if later edits follow.

Troubleshooting

The dates are in the wrong order. The column may contain text, mixed data types, or dates interpreted under a different locale. First undo the sort if it separated records. Check File > Settings for the spreadsheet’s locale, since locale affects how date formats are interpreted. Then standardize the entries to an unambiguous format that Sheets recognizes, such as a consistent year-month-day date, and verify a sample cell using Format > Number > Date. Re-sort the full table once the values are recognized consistently.

Some dates appear at the top or bottom unexpectedly. Blank cells, text values, and invalid dates can be grouped separately from valid dates. Inspect the affected cells for extra spaces, apostrophes, or inconsistent entry styles. Correct those values before sorting again. If blanks are intentional, decide whether they should remain at one end of the sorted table or be handled separately.

Rows became mismatched. You likely sorted only the date column or excluded some related columns from the selected range. Use Ctrl+Z on Windows or Command+Z on Mac immediately, then select all columns in the table and repeat the steps. If undo is no longer available, use version history from File > Version history > See version history to review or restore an earlier version, if you have permission.

The heading moved or was sorted like a date. Undo, reopen the sort options, and check that the range starts at the heading row and that Data has header row is selected. Alternatively, start the selection at the first data row and exclude the heading entirely, then sort without marking a header row.

The sort option is unavailable or the sheet will not change. Check whether you have edit access, whether a protected range prevents changes, and whether the selection includes merged cells. Ask the owner to adjust permissions or protection if needed. If the spreadsheet is open in a narrow browser window, menus may be less obvious; use the top menu bar and confirm that the range remains selected before choosing the sort command.

Frequently Asked Questions

How do I sort dates from newest to oldest?
Select the full table, open Data > Sort range > Advanced range sorting options, choose the date column, and select Z to A. Mark the header-row option if your selection includes column headings.

Does A to Z mean oldest to newest?
Yes, when Sheets recognizes the entries as dates. A to Z sorts from the earliest date to the latest; Z to A sorts from the latest to the earliest.

Can I sort by date and then by another column?
Yes. In the advanced range-sorting options, add another sort column after the date field. The date remains the primary order, and the additional column sorts records that share the same date.

Will sorting change the date values?
No. Sorting changes the order of the rows, not the date values themselves. The displayed format may still differ from the underlying recognized date, so use Format > Number if you want to change how dates look.

Can I sort without changing the order for everyone?
Use a filter view if it is available and appropriate for your sheet. A regular sort changes the sheet’s row order, which collaborators may also see. Filter views provide a separate view for sorting and filtering.

Why does a date like 03/04/2026 sort strangely?
It may be interpreted differently depending on locale, or stored as text. Check the spreadsheet locale and make the date format consistent before sorting. If the date’s intended meaning is unclear, confirm it with the person who entered it.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.