Stop Using PivotTables for This — Try Grouping Same Values in Excel Instead

Most Excel trainers tell you to pivot every time you see duplicate names or categories. They’re wrong. PivotTables are overkill if you just need to collapse rows with identical entries in column A—especially when your data changes daily, you’re sharing with non-technical colleagues, or you’re working on a 12-year-old laptop with 4GB RAM. We’ve all sat through that 30-second pivot refresh while the coffee gets cold.

The Problem

You’ve pasted raw sales data into Excel. Column A has sales rep names, but they’re scattered—not sorted, not grouped, and definitely not collapsible. You want to quickly see all orders from 'Sarah Chen' together, then 'Diego Morales', then 'Priya Kapoor'—and fold them up like an accordion. Right now? You can’t. You click and drag, copy-paste manually, or worse: you sort, then eyeball where each name starts and ends. That’s fragile. One misplaced row breaks it.

A1: Rep NameB1: ProductC1: AmountD1: Date
Sarah ChenCloudSync Pro$12,4502024-02-11
Diego MoralesDataShield Lite$3,8902024-02-14
Sarah ChenCloudSync Pro$9,2002024-02-18
Priya KapoorAPIFlow Starter$5,1002024-02-20
Diego MoralesDataShield Lite$14,6002024-02-22
Sarah ChenCloudSync Pro$7,3202024-02-25
Priya KapoorAPIFlow Starter$11,9502024-02-27
Diego MoralesDataShield Pro$22,1002024-03-01
Sarah ChenCloudSync Pro$15,7802024-03-03

Notice how Sarah appears four times—but not consecutively? That’s why sorting alone won’t help. And no, AutoFilter doesn’t let you collapse rows. You need structure—not just visibility.

The Solution

This isn’t about summarizing totals (that’s PivotTable territory). It’s about visual grouping: folding/unfolding blocks of identical values. Here’s what works—and it takes under 90 seconds:

  1. Sort by the column you want to group — Select A1:D10, then press Alt + A + S + S. Choose ‘Rep Name’ → ‘Ascending’. Now all Sarahs sit together, then all Diegos, then all Priyas.
  2. Select the entire data range — Click A1, then hold Ctrl + Shift + End. That selects everything down to the last used cell (D10 in our case).
  3. Apply Subtotal — Go to Data tab → Subtotal. In the dialog box:
    • At each change in: Rep Name
    • Use function: Count (yes, count—not sum!)
    • Add subtotal to: Rep Name only
    • Uncheck ‘Replace current subtotals’ and ‘Summary below data’
    Click OK.
  4. Toggle outline levels — Look at the left edge. You’ll see numbers 1, 2, 3. Click 2. Instantly, each rep’s block collapses into one row showing their name and count (e.g., “Sarah Chen (4)”)

That’s it. No formulas. No macros. Just native Excel behavior hiding in plain sight.

A1: Rep NameB1: ProductC1: AmountD1: Date
Sarah Chen (4)
Sarah ChenCloudSync Pro$12,4502024-02-11
Sarah ChenCloudSync Pro$9,2002024-02-18
Sarah ChenCloudSync Pro$7,3202024-02-25
Sarah ChenCloudSync Pro$15,7802024-03-03
Diego Morales (3)
Diego MoralesDataShield Lite$3,8902024-02-14
Diego MoralesDataShield Lite$14,6002024-02-22
Diego MoralesDataShield Pro$22,1002024-03-01
Priya Kapoor (2)
Priya KapoorAPIFlow Starter$5,1002024-02-20
Priya KapoorAPIFlow Starter$11,9502024-02-27

Surprise tip: If you double-click the gray bar between rows (e.g., between row 5 and 6), Excel auto-collapses *only* that group. Try it. You’ll feel like you cracked a secret.

Going Further

You can layer this technique. Want to group by rep *and* product? Sort first by Rep Name, then by Product (use Custom Sort with two levels). Then run Subtotal twice: once for Rep Name, then again for Product—with ‘Replace current subtotals’ unchecked both times. You’ll get nested outlines: level 1 = reps, level 2 = products within each rep.

Need totals? Change the Subtotal function from Count to Sum—and pick the Amount column (C1:C10). But be careful: if you use Sum *and* Count on the same field, Excel stacks them awkwardly. Better to add a helper column: in E2, type =IF(A2<>A1,1,0), drag down, then subtotal on column E using Sum. That gives clean counts without clutter.

And yes—you *can* group text, dates, or numbers. Just make sure the column is formatted consistently. A date stored as text (“02/11/2024”) won’t group with a real date (45345). Check with =ISNUMBER(A2).

When NOT to Use This

This method fails silently in three cases:

  • Your data has blank rows — Subtotal treats each blank row as a new group boundary. Delete blanks before applying.
  • You’re using Tables (Ctrl+T) — Subtotal doesn’t work inside structured tables. Convert back to a range first (Design tab → Convert to Range).
  • You need dynamic grouping across sheets — This is static per worksheet. For live cross-sheet grouping, use Power Query (Get & Transform) instead—it’s heavier, but built for this.

Also: don’t use this if your list exceeds 100,000 rows. Subtotal recalculates slowly on huge datasets. PivotTables or FILTER() with UNIQUE() scale better there.

Keyboard Shortcuts

ActionShortcutNotes
Open Sort dialogAlt + A + S + SFastest way to sort without touching the mouse
Select current data regionCtrl + Shift + 8Same as Ctrl+A, but stops at blank rows/columns
Collapse all groupsAlt + A + J + 1Level 1 = show only subtotals; Level 2 = show groups + details
Remove subtotalsAlt + A + J + RDon’t try to delete subtotal rows manually—they’ll reappear
Lisa Anderson

Lisa Anderson

Lisa is a certified Microsoft trainer who writes step-by-step guides for Power Automate