Grouping in Pivot? How to Group Data in Excel PivotTables

Charts & pivot tables · Updated November 22, 2026

Yes, you can group data in an Excel PivotTable. Grouping lets you combine rows or columns into categories—like turning daily dates into months, or individual products into price ranges—by right-clicking a field and choosing Group. This article explains how it works, the different ways to group, and how to fix the most common problems.

What Does Grouping in a PivotTable Do?

Grouping takes the values in a PivotTable field and bundles them into larger buckets. For example, if your source data has a Date column with 365 individual days, grouping by month reduces the PivotTable to 12 rows. You can group numbers (e.g., ages into 10-year bands), dates (days into months, quarters, or years), or text values (e.g., combine “Red” and “Blue” into a “Primary Colors” group).

When you group, Excel creates a new field (often named Date (Month) or Age (Group)) and adds it to the Row or Column area. The original field remains in the data; the group is a separate field you can use alongside it.

How to Group Dates and Numbers

For dates and numbers, the process is almost identical:

  1. Click anywhere inside your PivotTable.
  2. Right-click a cell that contains a date or number value (for example, a date in the Row Labels).
  3. Choose Group from the context menu. (On a Mac, the option is under PivotTable Analyze tab > Group > Group Selection.)
  4. In the Grouping dialog box, set Starting at and Ending at (Excel usually fills these automatically), then choose the grouping units you want: for dates, check Months, Quarters, or Years; for numbers, enter the By interval (e.g., 10).
  5. Click OK.

For numbers, you can only use one interval (like 10 or 100). For dates, you can select multiple units—for example, check both Months and Years to get a two-level hierarchy (Year > Month).

How to Group Text Values Manually

Text fields can’t be auto-grouped by interval, but you can manually select items and group them:

  • In the PivotTable, press Ctrl (or Cmd on Mac) and click the items you want to combine (e.g., “Red” and “Blue”).
  • Right-click and choose Group. Excel creates a group named “Group1” (you can rename it in the formula bar or by typing over it).
  • Repeat for other groups. The ungrouped items stay as they are.

Manual text groups are useful for categorizing product names, regions, or any list where the grouping logic isn’t numeric or date-based.

Grouping by Week or Custom Date Ranges

Excel’s built-in date grouping covers days, months, quarters, and years, but not weeks. To group by week, you need to add a helper column to your source data—for example, a formula that returns the week number or the start-of-week date.

Assuming your dates are in A2:A100, you can add a column with this formula to get the Monday of each week (adjust the 2 if your week starts on Sunday):

=A2-WEEKDAY(A2,2)+1

Then refresh your PivotTable and drag this new field into the Row area. You can group that field by day if needed, but the weekly start date already gives you one row per week.

For custom ranges (e.g., “Q1 2024” as a single group), you can manually select the months and group them, then rename the group.

Common Problems and How to Fix Them

Grouping often fails with an error like “Cannot group that selection.” Here are the usual causes and fixes:

  • Blank cells in the field: Grouping requires all cells in the column to have a value. Filter out blanks or fill them with a placeholder (like “N/A”) in the source data.
  • Mixed data types: If the column contains both text and numbers, or dates stored as text, Excel can’t group. Convert text to numbers or dates using Data > Text to Columns or the VALUE() function.
  • Formulas returning text: If your source column uses a formula that returns a date but the cell is formatted as text, grouping fails. Ensure the formula returns a real date (check with =ISNUMBER(A2)).
  • Grouped field already exists: If you try to group a field that’s already grouped, you’ll get an error. Ungroup first (right-click > Ungroup) or use a different field.

Another common issue: after grouping, new data added to the source doesn’t appear in the correct group. Always refresh the PivotTable (Data > Refresh) after changing source data. If new items still don’t group automatically, you may need to re-group or use a calculated field.

Grouping vs. Calculated Fields: Which to Use?

Grouping is for categorizing existing values. Calculated fields are for creating new values based on other fields (e.g., a profit field that subtracts cost from revenue). They solve different problems:

  • Use grouping when you want to summarize by a range (e.g., sales by age bracket).
  • Use a calculated field when you need to compute a new metric that doesn’t exist in your source data (e.g., commission = sales * 0.1).

You can combine both—for example, group by month, then add a calculated field for profit per month.

Grouping in PivotTables on Mac and Excel for the Web

Grouping works in Excel for Microsoft 365 on Windows, Mac, and Excel for the web, but the steps differ slightly:

  • Windows: Right-click > Group.
  • Mac: Use the PivotTable Analyze tab > Group > Group Selection (right-click works too in recent versions).
  • Excel for the web: Right-click a cell and choose Group. The dialog box is the same, but some advanced options (like multiple date units) may be limited. Manual text grouping is not available in the web version—you’ll need to use the desktop app.

If you’re using an older Excel version (2016 or earlier), grouping works the same way, but the ribbon path might be under Options > Group.

Frequently Asked Questions

Why is my “Group” option grayed out?

The Group option is grayed out when the selected cell isn’t part of a PivotTable field, or when the field contains blank cells or mixed data types. Click a single cell in the Row Labels or Column Labels that contains a value, and ensure your source data has no blanks in that column.

Can I group by quarter and month at the same time?

Yes. In the Grouping dialog, check both Quarters and Months. Excel will create a hierarchy with quarters as the parent and months as the child. You can expand or collapse the levels using the plus/minus icons.

How do I ungroup data in a PivotTable?

Right-click any cell in the grouped field and choose Ungroup. This removes all grouping for that field, returning it to individual values. If you manually grouped text items, you can right-click a group and choose Ungroup to break it apart.

Can I group by week in a PivotTable without a helper column?

No, Excel doesn’t have a built-in “week” grouping option. You must add a helper column in your source data that calculates the week number or week start date. Then use that column in the PivotTable.

What happens if I group a field and then add new data?

New data will appear in the PivotTable after you refresh, but it may not be automatically included in the existing groups—especially if the new values fall outside the original “Starting at” and “Ending at” range. You may need to right-click the group and choose Group again to adjust the range, or re-create the grouping.

Does grouping affect the original data?

No. Grouping only changes how the PivotTable displays the data. Your source data remains untouched. If you delete the PivotTable, the grouping is gone, but the data is still there.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

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

Spotted an error in this guide? Let us know.