Ravindra BagaleCourses & study guides मराठी Track your progress

7. PivotTables and PivotCharts

7.5 Grouping Dates and Numbers

Group numbers into bands in a PivotTable with example — in 30 seconds

What: Grouping puts numbers into equal bands, like ₹0–199 and ₹200–399, directly inside the pivot.

Why: Basket-size bands show whether customers buy small top-ups or big baskets, without a helper column.

Tiny example: With bands of 200, five orders fall in 0-199 and four in 200-399. One order (₹1,299) sits in 1200-1399.

First look at the data (before → after):

Group numbers into bands in a PivotTable with example: before and after tables, fictional FreshGo Maharashtra data

Expected result — Pivot grouped by Amount band

Row Labels Count of Order ID Sum of Amount
0-199 5 609
200-399 4 962
1200-1399 1 1,299
Grand Total 10 2,870

About this data: Teaching sample for a fictional shop “QuickCart Delivery”. Figures and names (e.g. Rohan Patil) are made up for this lesson on grouping dates and numbers.

Before table and formula as text

Before — Amounts in tblMini

Order ID Amount
BLK-1001 64
BLK-1002 270
AMN-1003 110
BLK-1004 240
AMN-1005 232
BLK-1006 150
BLK-1007 1299
AMN-1008 195
BLK-1009 220
BLK-1010 90

About this data: Demo table only — not real customer or company data. Built to practise grouping dates and numbers.

Formula / click path

Rows: Amount › right-click › Group…
Starting at: 0 · Ending at: 1399 · By: 200

Do it step by step:

  1. Make a pivot with Amount in Rows.
  2. Add Order ID to Values (Count) and Amount to Values (Sum).
  3. Right-click any amount in the Rows area and choose Group….
  4. Set Starting at 0, Ending at 1399 and By 200. Click OK.
  5. Check: the counts add up to 10 and the sums to 2,870.

Steps in Excel

  1. Dates: drag Order Date into Rows. Excel 2016+ may auto-group into Years/Quarters/Months. To choose yourself: right-click a date › Group… › select Months and Years (for multi-year data always include Years) › OK.
  2. Weeks: Group › select only Days › Number of days 7 › set Starting at to a Monday.
  3. Numbers: drag Amount into Rows › right-click › Group… › Starting at 0, Ending at 1500, By 250 → bands 0–249, 250–499, …
  4. Manual groups of text items: select Pune, Nashik and Sambhaji Nagar labels (Ctrl-click) › right-click › Group → "Group1" › rename to Western Maharashtra (for example).
  5. Ungroup: right-click › Ungroup.
  6. Turn off auto date grouping: File › Options › Data › tick Disable automatic grouping of Date/Time columns in PivotTables.

Worked example. Ravindra Bagale wants monthly sales for FY 2026-27 with the Ganeshotsav (September) and Diwali (November) spikes visible: Rows = Order Date grouped by Years and Months, Columns = Platform. September and November stand out immediately.

Ravindra Bagale's Tip

The dates won't group and you get the message "Cannot group that selection" – because one date in the column is text or blank. Many students think it's a PivotTable problem; the real problem is in the source data. Clean the date column (5.7), fill or filter out the blanks, then group. And if you have several years of data, select Years along with Months, otherwise March of two years gets combined.

Practice task

Group orders by Month and Year, then by 7-day weeks starting on a Monday. Create amount bands of ₹250 and count orders in each band.

Loading practice tasks...

  1. Total nights (Easy): Add up the "Nights" column. (sheet "Data")
  2. Average rate per night (Easy): Average of the Rate per night (£) column, rounded to 2 decimals. (sheet "Data")
  3. Rows in Standard (Easy): How many rows have Room type "Standard"? (sheet "Data")
  4. Largest nights (Easy): The largest value in the "Nights" column. (sheet "Data")
  5. Days taken (Easy): the "City" value in the first row minus the "Room type" value in the first row. (sheet "Dates")
  6. Start year (Easy): Year of the "Room type" value in row 3. (sheet "Dates")
  7. Due month (Easy): Month number of the "City" value in row 3. (sheet "Dates")
  8. Earliest start (Easy): Earliest date in the "Room type" column (as a date number). (sheet "Dates")
  9. Nights for Standard (Medium): Total of the Nights column where Room type is "Standard". (sheet "Data")
  10. Standard in Glasgow (Medium): Total of the Nights column where Room type is "Standard" and City is "Glasgow". (sheet "Data")
  11. Working days (Medium): Working days from the "Room type" value in the first row to the "City" value in the first row. (sheet "Dates")
  12. Weekday of due (Medium): Weekday number of the "City" value in row 4 (Sunday = 1). (sheet "Dates")

Worked example — grouping dates and numbers

Why

Meera Joshi in Pune and Carlos Rivera abroad both need a clear, repeatable way to use grouping dates and numbers on a NovaCraft Tools sheet without breaking totals.

What

Grouping Dates And Numbers is the Excel idea this page teaches. We will walk one tiny example end to end.

How

  1. Open a blank sheet. In A1 type a short label for grouping dates and numbers.
  2. Enter a small made-up value for Meera Joshi using € where money appears.
  3. Add a second value for Carlos Rivera using £ so you see mixed currencies stay numeric.
  4. Apply the method from this lesson step by step (menu or formula as shown above).
  5. Check the result still works inside SUM or a simple check cell.

Formula / action

Follow the formula or ribbon steps shown in this lesson (keep values numeric).
Result: The demo cell shows the expected result for NovaCraft Tools's sample row.
Meaning: Once grouping dates and numbers is correct on one row, copy the same pattern down the column.

Quick revision cards

Three standalone cards. Each one explains the idea with its own example. Scan the QR to open this lesson.

Revision card 1: What is Grouping Dates And Numbers?
Card 1: What is Grouping Dates And Numbers? · Download PNG
Revision card 2: Tiny example — Grouping Dates And Numbers
Card 2: Tiny example — Grouping Dates And Numbers · Download PNG
Revision card 3: Checklist — Grouping Dates And Numbers
Card 3: Checklist — Grouping Dates And Numbers · Download PNG