Yes. In Excel for Microsoft 365 on Windows, add a helper column that calculates each date’s quarter, then sort the entire table by that column. To keep quarters in calendar order across multiple years, include the year in the sort key; otherwise, sorting by quarter alone puts every Q1 together, then every Q2, and so on.
What sorting dates by quarter means
Excel stores real dates as serial numbers, so an ordinary ascending sort arranges them in chronological order—January before February, for example—but does not group all dates by quarter. A quarter is a group of three months: Q1 is January through March, Q2 is April through June, Q3 is July through September, and Q4 is October through December.
There are two common goals, and they produce different sort orders:
- Chronological quarters: Q1 2023, Q2 2023, Q3 2023, Q4 2023, then Q1 2024. Use a key that includes the year.
- Quarter-only grouping: all Q1 records together, followed by all Q2 records, regardless of year. Sort by quarter, then use year or date as a secondary sort if you want order within each group.
Decide which result you want before sorting. The quarter label by itself does not distinguish Q1 2023 from Q1 2024.
Make a quarter sort key with a helper column
A helper column is the most dependable method for a normal worksheet list. It leaves the original date intact and gives Excel a value that sorts in the order you need. Suppose dates are in A2:A100, with a header in A1. Add a heading such as Quarter key in B1, then enter the following in B2 and fill it down:
With the date in A2, this formula returns a numeric year-and-quarter key; for 15 May 2024, the result is 20242.
=YEAR(A2)*10+ROUNDUP(MONTH(A2)/3,0)
The first four digits represent the year and the last digit represents the quarter. For example, Q1 2024 produces 20241, Q4 2024 produces 20244, and Q1 2025 produces 20251. Ascending numeric order therefore follows the calendar, including the transition from one year to the next. The key is intended for sorting, not for display as a date.
If you want a human-readable label instead, use a separate helper column. With the date in A2, this formula displays Q2 for 15 May 2024:
="Q"&ROUNDUP(MONTH(A2)/3,0)
Labels Q1 through Q4 sort correctly alphabetically, but they do not preserve year order on their own. Use the numeric key or add another sort level when years matter.
Sort the whole table by the key
Once the helper values are filled down, sort the records—not just the helper cells—so each date stays attached to its customer, amount, or other fields. In Excel for Microsoft 365 on Windows:
- Click a cell in the data range. If the records are not already an Excel table, select the range and choose Home > Format as Table, or press Ctrl+T. Confirm whether the range has headers.
- Open Data > Sort. If Excel asks whether to expand the selection, choose to expand it so the complete rows move together.
- In the Sort dialog, select the Quarter key column under Sort by, choose Cell Values, and choose Smallest to Largest.
- Click OK. The rows will appear in quarter sequence, with dates within each quarter ordered by the key only as far as the key distinguishes them. If you need dates in order within a quarter, add Date as a second level, ascending.
For an Excel table, you can also use the filter arrow in the Quarter key header and choose a sort direction. A table automatically carries a calculated-column formula into new rows in many normal editing workflows, which makes the helper approach easier to maintain. On Mac, the same Data and table commands are available, although ribbon layout can vary; Ctrl+T’s usual Mac equivalent is Command+T.
Choose the right order across multiple years
A frequent source of confusion is sorting by a quarter number alone. If the helper column contains only 1, 2, 3, or 4, Excel will put all Q1 dates together, including dates from different years. That is correct only when the goal is to compare the same quarter across years.
For a chronological sequence, the combined key from the earlier example puts the year first and quarter second. For Q1-only grouping across years, use the quarter label or a quarter number as the first sort level, then add the date as the next level. In the Sort dialog, click Add Level; set Quarter as the first level and Date as the next. This produces Q1 records in date order, then Q2 records in date order, and so on.
You can also sort by the original date first and then group or summarize by quarter later. That is useful when the records need to remain strictly chronological, or when a chart or report—not the source list—is where quarter groupings are required. Keep in mind that sorting by a helper key with no date level does not necessarily arrange individual records chronologically inside a quarter.
Sort by fiscal quarters
Fiscal quarters do not always match calendar quarters. For a fiscal year beginning in July, for example, July through September is fiscal Q1, October through December is Q2, January through March is Q3, and April through June is Q4. A formula that simply divides the calendar month by three will not give the right fiscal quarter.
Suppose the date is in A2 and the fiscal year’s starting month number is in B1; enter 7 in B1 for July. This formula returns the fiscal quarter number, so a date in August returns 1 and a date in February returns 3:
=MOD(INT((MONTH(A2)-$B$1+12)/3),4)+1
To sort fiscal quarters chronologically across fiscal years, make a key that includes both the fiscal year and this quarter number. First decide how your organization names its fiscal years. If a July 2024–June 2025 year is called FY2025, use the year in which the fiscal year ends. With A2 as the date and B1 as the start-month number, this returns 2025 for a date in August 2024 when B1 contains 7:
=YEAR(A2)+(MONTH(A2)>=$B$1)
Excel treats the comparison as TRUE or FALSE, which contribute 1 or 0 in this arithmetic. Combine that fiscal-year result with the fiscal-quarter formula, or put fiscal year and fiscal quarter in separate helper columns and sort by both. Separate columns are often easier to review and explain. For fiscal calendars with a 4-4-5 pattern or other nonstandard periods, a simple month-based formula may not apply; use a calendar table that maps each date or period to the organization’s official fiscal year and quarter.
Use a PivotTable when you need a summary
If the goal is to report totals by quarter rather than rearrange individual records, a PivotTable is often more useful than sorting the source data. Select a cell in a list that has a real date column, then choose Insert > PivotTable. Put the date field in Rows and the value you want to summarize—such as sales—in Values.
In the PivotTable, right-click a date label and choose Group. In the grouping dialog, select Quarters and Years, then confirm. Including Years avoids combining, for example, Q1 2023 and Q1 2024 into one Q1 total. PivotTable grouping is for reporting; it does not change the order of the original source rows. If Group is unavailable or the grouping fails, check that the source dates are genuine Excel dates and that the field contains no blanks or text values.
Fix common sorting problems
- The dates sort alphabetically or unpredictably: Some entries may be text rather than date serials. A date that looks like 5/15/2024 can still be stored as text, especially after import. Apply a date format alone will not convert text into a real date.
- Rows become mismatched: Undo immediately with Ctrl+Z on Windows (Command+Z on Mac), then repeat the sort and expand the selection. Avoid sorting only the helper column.
- New rows are missing a key: Fill the formula down for the added records, or keep the data in an Excel table so its calculated column can extend with the table.
- Quarter labels appear in the wrong order: Labels such as First, Fourth, Second, Third sort alphabetically, not numerically. Use Q1–Q4, a numeric quarter helper, or a custom numeric key.
- Some rows are not included: Look for blank rows or separate blocks that split the data range. A table helps keep a continuous list together, but confirm its boundaries before sorting.
For imported text dates, select the affected column and try Data > Text to Columns. In the wizard, proceed through the steps, choose the appropriate date order under Column data format (such as MDY or DMY), and finish. Make a copy first if the column is important: choosing the wrong order can interpret ambiguous dates incorrectly. After conversion, verify a few dates and set a suitable date format before building the quarter key.
Frequently Asked Questions
Can Excel sort dates directly by quarter without a helper column?
Not as a standard sort option in a regular worksheet list. Excel sorts date values by their full date, so use a quarter helper column for a repeatable sort. A PivotTable can group dates into quarters for a summary without adding a quarter column to the source list.
How do I put all Q1 dates together, regardless of year?
Create a quarter-only value or Q1–Q4 label and sort by it ascending. Add the date as a second sort level if you want records within each quarter arranged by year and date.
How do I keep Q4 2023 before Q1 2024?
Use a sort key that includes both year and quarter, such as the year-and-quarter formula above. A quarter-only field cannot tell which year a record belongs to.
Can I sort by fiscal quarter instead of calendar quarter?
Yes. Calculate the quarter relative to the fiscal start month, then sort by fiscal year and fiscal quarter. For a nonstandard fiscal calendar, use a mapping table that reflects its actual periods.
Why does Excel’s PivotTable not group my dates into quarters?
Grouping generally requires a date field with valid date values throughout the source. Check for text dates, blanks, or other non-date entries, correct them, refresh the PivotTable, and try grouping again.
Related
- Excel Repair Tools for XLS and XLSX Files: What Works
- Excel Shuffle List of Names: 10 Easy Methods
- Excel: Find Where a Cell Is Used Across Sheets
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel Formula Showing Instead of Result? Causes and FixesIf Excel is showing a formula instead of its result, first check whether Show Formulas is turned on;…
- Excel SUMIF Criteria Examples for Text, Dates, and NumbersExcel’s SUMIF function adds values when one matching condition is true. With categories in A2:A7 and amounts in…
- Excel COUNTIF for Red Text: What WorksExcel’s COUNTIF function cannot count cells by red font color: COUNTIF checks cell values, not formatting. To count…
- Insert a Row in Excel With a Formula: Real OptionsA formula cannot insert a physical worksheet row or move existing cells. To show a blank row inside…
- Create a Sort List in Excel: Methods, Steps, and TipsTo create a sorted list in Excel, select a cell in your data and choose Data > Sort…
- Excel Time Formulas for Calculating Hours WorkedTo calculate hours worked in Excel, subtract the start time from the end time and multiply by 24;…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.