To sort a range by date in Google Sheets, select the entire table, open Data > Sort range > Advanced range sorting options, choose the date column, and sort A to Z for oldest-to-newest or Z to A for newest-to-oldest. Include every column whose values belong together, and mark the header row if your selection has column headings. That keeps each date attached to the right record.
Before you begin, check that the dates are real date values rather than text that merely looks like a date. Sheets can sort real dates chronologically; text dates may sort alphabetically or in an unexpected order. The instructions below are for Google Sheets in a web browser. Excel has a different menu flow; its equivalent sorting controls are on the Data tab.
What You’ll Need
- A Google Sheets spreadsheet open in a web browser, with permission to edit it.
- A table with one date column and the related information you want to keep together in each row.
- A clear idea of whether you want the oldest or newest dates at the top. If your cells look like dates but sort incorrectly, you may need to convert them first.
Step-by-Step
-
Check the table and identify its boundaries. Find the first and last rows and columns that make up the data you want sorted. Include all related columns, such as a customer name, status, amount, or notes alongside the date. For example, if dates are in column A and the associated details are in columns B through D, sort columns A through D together. Do not select only the date column: that would move dates without moving their matching details.
If there are unrelated notes or a second table beside or below your data, leave them outside the selection. Look for blank rows or columns that might split the table. A fully blank row can make it harder to select the correct range, so use the actual table boundaries rather than assuming all nearby cells belong together.
-
Select the complete range. Click the first cell in the table, then drag to its bottom-right cell. Alternatively, click the first cell, hold Shift, and click the last cell to select the rectangular range between them. You can also click the name box to the left of the formula bar, type a range such as A1:D50, and press Enter; replace that example with your table’s actual cell addresses.
Include the header row if your table has one. A header might contain labels such as Date, Item, or Amount. Including it lets Sheets keep the headings in place when you tell the sort dialog that the range has a header row.
-
Open the range-sorting controls. With the range selected, choose Data > Sort range > Advanced range sorting options from the Google Sheets menu. The advanced option is useful because it lets you choose the sort column and specify whether the first row is a header. Avoid choosing a command that sorts just one column if your goal is to keep the table’s rows intact.
-
Set the header option and date column. In the Sort range dialog, select Data has header row if the first row of your selected range contains labels. Then use the Sort by menu to pick the column with the dates. If you did not select the header row, the column choices may appear as letters instead of heading names; select the correct date column by its letter.
Take a moment to verify that the dialog is sorting the date field, not a neighboring field such as a name or status. If the displayed column name is unexpected, cancel and reselect the range or correct the header-row setting.
-
Choose the date order and apply it. Select A to Z to place earlier dates before later dates. Select Z to A to place later dates before earlier dates. Click Sort to apply the order to the selected range. The letters describe ascending or descending order; for genuine date values, they correspond to chronological order.
For instance, an ascending sort places April 3 before April 18, even if the cells display dates in a format such as 3 Apr and 18 Apr. A descending sort reverses that order. Check several rows after sorting to make sure the date and its related information stayed together.
-
Add a second sort rule if dates repeat. If you want records with the same date arranged consistently, open the advanced range sorting options again and choose Add another sort column. Set the date column as the first sort rule, then select a secondary column, such as name or time, and choose its order. The secondary rule only determines the order of rows that tie on the first rule; it does not replace the date sort.
For date-and-time values, the time may already determine the order within a day, even if the cells display only the date. If the times are important, use a display format that shows them or sort by a separate time field.
Sorting changes the order of the selected rows in the sheet and may be visible to other editors. If you sorted the wrong range, use Undo right away: Ctrl+Z on Windows or Chromebook, or Command+Z on a Mac. Undo can also reverse other edits made afterward, so check the sheet before using it.
Common Mistakes
- Sorting only the date column. This separates dates from names, amounts, and other details. Select the full table range before opening the sort dialog.
- Forgetting to identify the header. If the header row is treated as data, its label may be moved into the records. If a data row is treated as a header, that row may be excluded from sorting. Set Data has header row to match your selection.
- Assuming date formatting converts text. Choosing Format > Number > Date changes how compatible values are displayed, but it does not reliably turn text into real dates. A cell can look like a date and still be stored as text.
- Choosing the wrong direction. A to Z means earliest first for real dates; Z to A means latest first. Confirm the first few rows after sorting instead of relying only on the arrow or menu label.
- Including extra cells or omitting part of the table. A range that is too small can leave related records unsorted. A range that is too large can rearrange unrelated information. Check the selection outline before sorting.
- Using merged cells in the sort area. Merged cells can prevent a range from sorting normally. If Sheets reports an issue, unmerge cells in the data area or restructure the table so each record occupies a regular row.
Tips
- Make a copy before a high-stakes reordering. Choose File > Make a copy if you need a safe version to compare with. This is especially useful when several people edit the same sheet or the table feeds another workflow.
- Use a filter when you sort frequently. Select the table, then choose Data > Create a filter. Use the filter icon in the date column to sort A to Z or Z to A. A filter is convenient for repeated sorting and filtering, but still make sure the filter covers the whole table.
- Keep dates in a consistent format. A consistent entry style makes dates easier to read and reduces ambiguity. For example, 2026-04-12 is less ambiguous than 4/12/26 when people use different regional date conventions. The display format can differ from the underlying date value.
- Check spreadsheet locale if dates are being interpreted differently. Choose File > Settings and review the Locale setting. Locale affects how Sheets recognizes some date inputs. Changing it can affect how numbers and dates are interpreted or displayed, so check other sheet values before changing the setting on an established file.
- Sort a filtered or shared sheet carefully. If other editors need to retain their own view, consider using a filter view, available from Data > Filter views, rather than changing the main sheet’s row order for everyone. Check the options shown in the menu for the current sheet and your access level.
Troubleshooting
The order is not chronological. The date cells may be text, or the entries may have been interpreted using a different locale. First, check a few cells by selecting them and looking at the formula bar and number format. Applying Format > Number > Date can help display values that are already dates, but if that does not change the sort order, investigate whether the entries are text and whether the locale matches their format.
If A2 contains text such as 2026-04-12 and Sheets recognizes that format, enter =DATEVALUE(A2) in an empty helper cell on the same row, then fill the formula down for the other text dates. With 2026-04-12 in A2, the result is the date April 12, 2026 (serial value 46124). Apply Format > Number > Date to the helper results if they display as numbers. If DATEVALUE returns an error, the text may not match a date format recognized by the spreadsheet locale; correct the source format or adjust the locale before converting. Once the converted dates are correct, copy the helper results and use Edit > Paste special > Values only to place values where needed. Keep a copy of the original data until you have checked the conversion.
Rows no longer match their dates. Undo immediately with Ctrl+Z on Windows or Chromebook, or Command+Z on Mac. Then select the entire table and repeat the sort. If you cannot undo because more changes have been made, restore a previous version through File > Version history > See version history, if you have permission and the relevant version is available.
The header moved or disappeared from the expected position. Undo, select the range again, and check whether its first selected row is actually a header. Turn on Data has header row only when the selected range begins with column labels. If the header is outside the selection, include it before sorting or keep it separate and sort only the data rows.
The sort command is unavailable or the sheet will not change. Confirm that you have edit access and that you selected a valid range. Protected cells or a protected sheet can limit what you can change; ask the owner to adjust permissions if needed. Also check for merged cells in the selected range and try unmerging them. If you are using a filter, make sure it covers the rows and columns you intend to sort.
Frequently Asked Questions
How do I sort dates from newest to oldest in Google Sheets?
Select the whole table, choose Data > Sort range > Advanced range sorting options, select the date column, and choose Z to A. Confirm the header-row setting before clicking Sort.
Does A to Z mean oldest to newest for dates?
Yes, when the cells contain real date values. A to Z sorts dates in ascending order, from the earliest to the latest. Text that only resembles a date may not follow chronological order.
Can I sort by date without moving the header?
Yes. Include the header row in your selected range and check Data has header row in the sort dialog. Sheets will use the header as a label rather than sorting it with the records.
Why are some dates out of order even though they look the same?
Some may be stored as text while others are date values, or the underlying entries may include different times that are not shown. Check the cell values, locale, and number format; convert text dates to real dates before sorting.
Can I sort by date and then by another column?
Yes. In the advanced sort options, add another sort column after setting the date as the first rule. The additional rule orders records that have the same date according to your chosen field.
Will sorting affect other people viewing the sheet?
A normal range sort changes the row order in the sheet, which other editors may see. If collaborators need separate views, use a filter view where appropriate, or make a copy before changing the shared data.
Related
- Compare Two Documents in Word: Create a Redline
- Compare Documents in Word and Create a Redline
- How to Compare Two Documents in Microsoft Word Easily
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Sheets Freeze Rows on iPad: A Practical GuideYes. In the Google Sheets app on an iPad, open the spreadsheet, touch and hold the number of…
- Clear Outlook Cache: Find the Path and Remove It SafelyIn classic Outlook for Microsoft 365 on Windows, the main offline cache is usually an OST file in…
- Excel Unable to Find Circular Reference?If Excel is unable to find a circular reference, open Formulas > Error Checking > Circular References and…
- How to Add a Blank Cover Page in WordTo add a blank cover page before an existing document in Microsoft Word, place the cursor at the…
- Creating a Calendar in Google Sheets: Steps and TipsTo create a calendar in Google Sheets, open a blank spreadsheet, set up weekday headings and a date…
- Excel Date as Number: Excel Serial Dates ExplainedYes. Excel stores dates as serial numbers: the whole-number part counts days, and any decimal part represents a…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.