FormulaCraft

How to build a pivot-style summary with formulas in Excel and Google Sheets

Topic:Pivot-style summaries (formula approach)
Excel & Google Sheets
=SUMIFS($C$2:$C$9,$A$2:$A$9,$E2,$B$2:$B$9,F$1)

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Set up a flat data table with row category labels in A (e.g. Region), column category labels in B (e.g. Product), and values in C (e.g. Sales).
  2. 2Create the summary layout: list unique row labels in E2:E4 (e.g. East, North, South) and unique column labels in F1:H1 (e.g. Gadget, Widget, Other).
  3. 3In F2 enter =SUMIFS($C$2:$C$9,$A$2:$A$9,$E2,$B$2:$B$9,F$1). The data ranges are fully absolute ($); the row label uses a mixed reference ($E2 — column locked, row free); the column label uses a mixed reference (F$1 — row locked, column free).
  4. 4Copy F2 across to H2, then down to H4. Each cell computes the correct intersection total automatically.
  5. 5Add totals: =SUM(F2:H2) at the right of each row, =SUM(F2:F4) at the bottom of each column, and =SUM($C$2:$C$9) as the grand total. Verify all totals match.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

Why use formulas instead of a pivot table?

Formulas update continuously without a manual refresh, can be embedded in dashboards with controlled layout, and work in templates or protected sheets where pivot tables cause permission issues. Pivot tables are faster to build for ad-hoc exploration.

Can I add a percentage-of-total column alongside the sums?

Yes — add a column dividing each intersection by the grand total: =F2/$I$5 (where I5 holds the grand total). Format as percentage. Use the same mixed-reference pattern so it copies correctly.

More on Pivot-style summaries (formula approach)

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: