FormulaCraft

How to build a cross-tabulation with formulas in Excel and Google Sheets

Topic:Pivot-style summaries (formula approach)
Excel & Google Sheets
=SUMIFS($C$2:$C$7,$A$2:$A$7,$E2,$B$2:$B$7,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 flat data: A = Region (row dimension), B = Quarter (column dimension), C = Sales (values), rows 2-7.
  2. 2In E1:H1 place your cross-tab header: E1='Region', F1='Q1', G1='Q2', H1='Q3'.
  3. 3In E2:E4 list your row labels: 'East', 'West', 'North'.
  4. 4In F2 enter =SUMIFS($C$2:$C$7,$A$2:$A$7,$E2,$B$2:$B$7,F$1). The mixed references lock the data range absolutely, lock the row label column ($E), and lock the column header row ($1).
  5. 5Copy F2 across to H2, then down to row 4 — the formula populates the entire cross-tab grid.

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

How is this different from a pivot table cross-tab?

The formula cross-tab updates instantly when source data changes and lets you control exactly which rows and columns appear. A pivot requires manual refresh and auto-generates its row/column headers from the data.

Can I average instead of sum in the cross-tab?

Replace SUMIFS with AVERAGEIFS using the same structure: =AVERAGEIFS($C$2:$C$7,$A$2:$A$7,$E2,$B$2:$B$7,F$1).

What if my row or column labels are not known in advance?

Use UNIQUE to generate distinct row and column labels dynamically, then reference those in your SUMIFS grid.

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: