Sub topic 2
Why Dates and Numbers Can Be Grouped
This chapter assumes you can create a PivotTable, place fields in Rows, Columns, and Values, and use Sum and Count. It explains what the source data must contain before the Grouping dialog works. The next chapters use that dialog.
Grouping works on numbers
Excel stores a date as a serial number. It counts the days since January 1, 1900, so 1 is January 1, 1900. A date in 2026 is a number a little above 46,000. The cell only looks like a date because of its number format.
This is why dates and numbers can be grouped in the same way. Excel is not reading a calendar label. It is sorting numbers into buckets.
- For dates, a bucket is a span such as a month, a quarter, or a year. Excel works out which span each serial number falls into.
- For numbers, a bucket is a range such as 0–9, 10–19, and so on.
Text has no numeric value to bucket. A text field can only be grouped by hand, which a later chapter covers.
What the source column must contain
Grouping needs every cell in the field to be a real number or a real date. A text value, or a blank cell, can stop the grouping. A date that is stored as text, such as "2026-03-14" typed with a leading apostrophe or imported from a CSV file, looks like a date but is not one.
The common problems are:
- Dates imported as text.
- Blank cells in the date column.
- Placeholder text such as
N/AorTBDin a numeric column. - Numbers with a trailing space or a stray character, which Excel reads as text.
Check the column with ISNUMBER
You can test a cell in the source data with a formula.
=ISNUMBER(A2)ISNUMBER returns TRUE when the cell holds a real date or number. It returns FALSE when the cell holds text. Fill the formula down a helper column next to your data, then look for FALSE results. Those are the cells that block date grouping.
For example, suppose column A holds order dates:
| Row | A (Order date) | `=ISNUMBER(A2)` result |
|---|---|---|
| 2 | 14-Mar-2026 (real date) | TRUE |
| 3 | 14-Mar-2026 (text) | FALSE |
| 4 | (blank) | FALSE |
Rows 3 and 4 are the ones to fix. A real date is usually right-aligned in the cell by default. A text date is usually left-aligned. This is a quick visual clue, but ISNUMBER is more reliable because alignment can be changed by hand.
How the PivotTable sees the field
The PivotTable reads the source column when you build it. If the whole column is numeric, the field is treated as a number or date field and the Group command becomes available. If the column mixes numbers and text, the field is not treated as numeric, and grouping fails with the "Cannot group that selection" error. A later chapter covers that error in detail.
Fixing a bad column
When ISNUMBER finds FALSE cells, fix the source data, not the PivotTable. Common fixes are:
- Replace placeholder text with a real value, or remove the row.
- Fill blank date cells with a date, or delete the empty rows.
- Convert text dates to real dates. Select the column, use Data > Text to Columns, choose Delimited, then Finish (or pick a Date format on the last step).
- Run
ISNUMBERagain until the whole column returnsTRUE.
Then right-click the PivotTable and choose Refresh so it reads the corrected data.
Exercise
A column of order dates shows TRUE for most rows and FALSE for three rows when you run =ISNUMBER(A2). Why does this matter for grouping, and what do you do first?
Show answer
The three FALSE cells hold text or are blank, so the field is not purely numeric and the Group command can fail with "Cannot group that selection". Fix those three cells in the source data (convert the text to real dates or fill the blanks), confirm ISNUMBER returns TRUE for every row, then refresh the PivotTable.
Exercise
Why can Excel group dates into months and quarters, even though a date looks like text such as 14-Mar-2026?
Show answer
A date is stored as a serial number, and the date appearance comes only from the number format. Excel places each serial number into a month or quarter bucket, in the same way it places an ordinary number into a numeric range.