Templates, guides & honest tool reviews for small business

Monday, November 30, 2026

Group Pivot Table Dates by Month in Excel, and Keep the Years Apart

Section: Excel & Google Sheets

Group pivot dates by month - explanatory illustration for Group Pivot Table Dates by Month in Excel, and Keep the Years Apart
Illustration: Group pivot dates by month

Grouping pivot table dates by month in Excel turns a list of hundreds of individual days into twelve rows you can read. Right-click any date in the pivot, choose Group, pick Months under By and select OK, and the pivot rebuilds itself around the months. The steps are short; the part that catches people is the year, because grouping on months alone puts January of every year into the same row. This guide covers the steps, keeping the years apart, naming the group, grouping numbers by interval, and undoing it when the layout changes.

What grouping does

Microsoft describes grouping as a way to show a subset of data for analysis, and gives the example of turning an unwieldy list of date and time fields into quarters and months. The pivot keeps every row of source data; it just rolls the dates up before it summarises them.

Grouping is a property of the pivot field, not of the source data. Nothing in your table changes, and deleting the pivot leaves the data exactly as it was.

Before you group: real dates

Grouping needs dates, not text that looks like dates. If Group is greyed out when you right-click a value, the column is almost certainly text, which happens when dates arrive from another system as strings or when a column is formatted as text before the dates are typed.

The quick check is alignment. Real dates sit to the right of the cell by default, text sits to the left. If the field also shows in the pivot as a long list of individual days with no grouping options, that is the same symptom. Convert the column to dates and refresh before you try again. Keeping the source as an Excel Table also means a refresh picks up new rows without you redefining the range.

The steps

  1. In the pivot table, right-click a value in the date field and select Group.
  2. In the Grouping box, select the Starting at and Ending at checkboxes and edit the values if you want the range to differ from the data.
  3. Under By, select a time period. For a numeric field, type the interval instead, such as 10 for bands of ten.
  4. Select OK.

Two details from Microsoft's own instructions are easy to miss. The Starting at and Ending at boxes are optional, and leaving them as they are is usually right. And the By list accepts more than one period, which is the answer to the year problem below.

Grouping dates in four steps - explanatory illustration for Group Pivot Table Dates by Month in Excel, and Keep the Years Apart
Grouping dates in four steps (explanatory illustration, not a software screenshot).

Months and years together

Select Months alone and the pivot shows Jan, Feb, Mar and so on, with every year folded into the same twelve rows. For a single year of data that is exactly what you want. For three years it is a quiet error, because January 2025 and January 2026 are added together and the total looks like a bad month.

Select Months and Years together under By and the pivot grows a hierarchy: years at the top, months underneath, each year kept separate. Quarters work the same way and can be combined with months. The rule is simple: if the data spans more than one year, always include Years.

Months alone merge the years - explanatory illustration for Group Pivot Table Dates by Month in Excel, and Keep the Years Apart
Months alone merge the years (explanatory illustration, not a software screenshot).

Numbers group by interval

The same dialog handles numeric fields. Microsoft's instruction is to enter a number that specifies the interval for each group, so an order value column can be grouped in bands of 50 or a quantity column in bands of 10. The pivot then shows one row per band instead of one row per value.

This is the fastest way to turn a long numeric column into a distribution, and it saves building a helper column with a lookup or an IFS formula.

Naming the group

The default field name is not always clear, especially after a refresh renames something. Microsoft's steps are to select the group, then use Analyze and Field Settings, and to change the Custom Name in the dialog before selecting OK.

Name it for the reader: "Month" rather than "Months (Date)", and "Order band" rather than "Values". The name appears as a column heading in every report that uses the pivot.

Naming a pivot group - explanatory illustration for Group Pivot Table Dates by Month in Excel, and Keep the Years Apart
Naming a pivot group (explanatory illustration, not a software screenshot).

Grouping selected items

Grouping is not only for dates. Hold Ctrl and select two or more values in the pivot, right-click and select Group, and the selected items become one row. That is how you turn eight product names into three product families, or combine a handful of regions into a sales territory.

Microsoft documents exactly those two steps, and they work on any field in the rows or columns area. The grouped row can be renamed with the same Field Settings dialog.

Ungrouping

To undo it, right-click any item in the group and select Ungroup. The pivot returns to the individual values, and the source data is untouched throughout.

Ungroup before you change the field layout. A group that spans several fields, such as months inside years, has to be removed as a whole, and trying to drag one level out of it usually produces a pivot that looks broken rather than an error.

Time grouping happens on its own

Newer versions of Excel detect time relationships automatically. Microsoft states that with time grouping, relationships across time-related fields are detected and grouped together when you add rows of time fields to a PivotTable, and that the group can then be dragged into the pivot for analysis.

If your pivot already shows months without you doing anything, that is why. The manual Group dialog still works and is the way to add quarters, change the start and end dates, or group numbers.

Common problems

  • Group is greyed out. The field holds text, or it sits in the Values area instead of Rows or Columns.
  • January totals look too high. Months were grouped without Years, so every year is added together.
  • One row for the whole year. Only Years is selected under By. Add Months as well.
  • A group disappears after refresh. The source column was renamed or removed. Rebuild the group and keep the header stable.
  • Grouping options missing on a numeric field. The column contains text or blanks. Clean it and refresh.
  • A pivot that will not ungroup. Part of a multi-level group is still selected. Right-click the top level and ungroup the whole thing.
Why Group is unavailable - explanatory illustration for Group Pivot Table Dates by Month in Excel, and Keep the Years Apart
Why Group is unavailable (explanatory illustration, not a software screenshot).

Questions and answers

Does grouping change my data?

No. It changes how the pivot summarises the data. The source table is not touched.

Why do I get one January instead of one per year?

Because only Months was selected. Group by Months and Years together.

Can I group by week?

The By list offers days, months, quarters and years. For weeks, add a helper column to the source with a week number and group the pivot on that.

Can I group text values?

Yes. Ctrl-click the items you want, right-click and select Group. The group then behaves like a single category.

Does this work in Google Sheets?

Google Sheets pivots have their own grouping options that work differently. See how pivot tables in Google Sheets handle dates before you copy a layout across.

How do I group numbers into bands?

Right-click a value, choose Group, and enter the interval under By, such as 10 or 50.

Official references

العربية