Wauvel
Toolkit

SUMIFS: turn a raw QuickBooks export into a P&L with one formula

← All posts
By Blake EkelundJuly 7, 2026 · 8 min read

Export your general ledger from QuickBooks (or Xero, or a bank feed) and what lands in Excel isn't a report — it's a flat list. One row per transaction: a date, an account, an amount, maybe a class or a vendor. Hundreds or thousands of rows. Somewhere in there is your P&L, but it's smeared across every line.

The one formula that turns that pile into a statement is SUMIFS— “sum with conditions.” It adds up only the rows that match the rules you give it, so you can say add every amount where the account is Revenue and the month is Juneand get one number back. Do that for each line and each period and you've built a P&L that rebuilds itself the moment you paste in fresh data.

The one-line answer: =SUMIFS(Amount, Account, "Revenue", Month, "Jun") — the numbers to add first, then pairs of where-column, must-equal. Add as many pairs as you have conditions. Everything else in this post is detail on that one shape.

The problem: a ledger is a list, not a report

Here's what an export actually looks like — a transaction log, sorted by date, with the account and amount you care about buried in columns you now have to add up by hand:

The raw export
ABCD
1DateAccountMonthAmount
26/03RevenueJun42,000
36/09COGSJun-18,300
46/14RevenueJun61,500
56/21PayrollJun-28,900
66/28RevenueJun80,700
77/02RevenueJul39,400
Every transaction on its own row. Useful for detail, useless as a report — until you can roll it up by account and period.

You could filter to Revenue, eyeball June, and type the total into a summary tab. That works exactly once. Next month the rows change and your hand-typed number is a lie. SUMIFS does the filtering and the adding, live, so the summary is never stale.

SUMIFS, one argument at a time

The syntax reads a little backwards the first time, because the thing you want (the numbers to add) comes first, and the conditions come after in pairs:

  • sum_range — the column of numbers to total. Here, Amount.
  • criteria_range1, criteria1 — a column to test and what it has to equal. Account must be "Revenue".
  • criteria_range2, criteria2, … — repeat for every extra condition. Month must be "Jun". You can stack up to 127 pairs; a row has to pass all of them to be counted.
One condition
B2=SUMIFS(Amount, Account, "Revenue")
AB
1All revenue223,600
SUMIFS adds only the Amount rows where Account equals Revenue — across the whole ledger, no filtering by hand.

Point the criteria at a cell instead of a typed value and the formula becomes a control panel: put the month in B1, reference $B$1, and the whole statement re-reads when you change one cell.

Two conditions: the actual P&L cell

A real P&L cell is the intersection of a line (Revenue) and a period(June) — so it takes two conditions. This is the formula you'll copy across a whole grid of accounts and months:

Account × month
C2=SUMIFS(Amount, Account, "Revenue", Month, "Jun")
ABC
1LinePeriodAmount
2RevenueJun184,200
Two condition pairs — account AND month. This single cell is the building block of the entire statement grid.

Anchor the ranges with $ (so $D:$D and $B:$Bdon't shift as you fill), leave the account and month references relative so they pick up the row and column headers, and one formula fills the whole matrix. That's the entire trick: a wall of the same SUMIFS, each cell reading its own row label and column label.

The finished statement, built from the list

Fill that formula down the lines and across the months and the flat export becomes a statement that foots and updates itself:

P&L — rolled up
LineJunJulAug
Revenue184,200196,800203,100
Cost of goods(71,400)(76,200)(78,900)
Gross profit112,800120,600124,200
Payroll(58,900)(58,900)(61,300)
Operating expense(31,200)(34,700)(33,800)
Net income22,70027,00029,100
Every figure here is a SUMIFS reading the same ledger. Paste in next month's export and the whole thing re-totals.

The subtotal rows — Gross profit, Net income — are plain arithmetic on the SUMIFS cells above them, not more lookups. That's the whole model: SUMIFS pulls the raw lines up to each P&L line, and simple addition stacks them into subtotals.

The traps that return a wrong number silently

SUMIFS almost never throws an error when it's wrong — it just returns 0, or a number that's a little off, and looks perfectly confident doing it. These are the four that catch people:

  • Text vs. number mismatch.If your account codes came in as text (“4100” the label, not 4100the number), a numeric criterion won't match and you get 0. Left-aligned values in a column of numbers are the tell.
  • Trailing spaces. "Revenue " with a stray space is not "Revenue". Exports are full of them. Wrap the source column in TRIM once, or clean it on import.
  • Mismatched range sizes. If sum_range is D2:D500 but a criteria range is B2:B499, you get a #VALUE!. Keep every range the exact same height — whole-column references (D:D, B:B) sidestep it entirely.
  • Operators need quotes. To sum amounts over 30 days or above a threshold, the operator goes inside the quotes: ">30", or ">="&B1 when the cutoff lives in a cell.

SUMIFS or a PivotTable?

The honest answer: both, for different jobs. A PivotTable is faster when you're exploring— drag account onto rows, month onto columns, and you've got a cross-tab in ten seconds, no formulas. But it's a snapshot: it doesn't recalculate until you remember to hit Refresh, and you can't drop one cell into a sentence or a chart without it fighting you.

SUMIFS wins when the layout is fixedand needs to stay live — a P&L that always has the same lines in the same order, feeding a dashboard, a forecast, or a board pack. Every cell recalculates the instant the data changes, and each one is a normal cell you can reference anywhere. Reach for the Pivot to find the shape of the data; reach for SUMIFS to build the report you'll reuse every month.

Its two siblings round out the set: COUNTIFS counts the rows that match instead of summing them (how many invoices are 30+ days late), and AVERAGEIFS averages them (average deal size by stage). Same argument shape, different verb.

This is exactly the roll-up Wauvel does for you — we read your ledger and return the statement, already built and narrated, so you don't rebuild the SUMIFS grid every month. See a sample report →

See what a report like this looks like on your own numbers.

Get my free report →

Keep reading

ToolkitJuly 3, 2026 · 8 min read

Cleaning messy data in Excel: the six functions that do it

Exported data almost never arrives clean — names in three different cases, addresses jammed in one cell, trailing spaces that quietly break your lookups. Here are the six Excel functions that turn a messy paste into data you can actually total, match, and trust.

Read it →
ToolkitJuly 1, 2026 · 7 min read

XLOOKUP vs VLOOKUP vs INDEX/MATCH: which lookup should you use?

The one-line answer is XLOOKUP — but VLOOKUP and INDEX/MATCH still earn their keep, and INDEX MATCH MATCH does something none of the others can. Here's each one, side by side, with the exact moment you'd reach for it.

Read it →
ToolkitJune 26, 2026 · 9 min read

The case of the missing cash: a CFO's afternoon in Excel

A wholesale distributor turns a profit every month and still can't make its credit line breathe. Here's the afternoon a fractional CFO spent cracking it — and the dozen Excel formulas she reached for, what each one does, and exactly when you'd use it.

Read it →
ToolkitJune 26, 2026 · 9 min read

Financial modeling best practices: building a model that doesn't break

Models almost never fail on the math — they fail on structure, trust, and rot. Here are the practices CFOs use to build a model a banker (or your future self) can actually follow and believe.

Read it →
ProductJuly 9, 2026 · 5 min read

Alerts and Watch-outs: your 24/7 CFO

A real CFO doesn't wait for month-end. Two new features watch your live QuickBooks every day: Alerts ping you the moment a number you care about crosses a line, and Watch-outs quietly reviews your books for the mistakes that quietly break your reports.

Read it →
Finance 101July 7, 2026 · 9 min read

What's a healthy LTV:CAC ratio? (and how to find yours)

The number every founder spending on ads needs and the books won't give you: how much you can afford to pay for a customer. Here's how to calculate CAC and LTV honestly, what the 3:1 rule really means, why payback period bites harder than the ratio, and the ceiling you can bid to.

Read it →
ProductJuly 6, 2026 · 4 min read

Ask your finances a question — right in Slack

Type /wauvel and ask your AI CFO anything about your live QuickBooks numbers — cash, runway, top customers, a month's net income, even a hiring what-if — without leaving Slack. Plus daily digests and report pings in the same channel.

Read it →
ProductJuly 4, 2026 · 3 min read

Wauvel now posts your reports to Slack

Connect Slack once and your reports, daily digests, and cash alerts land in the channel your team already works in — not just your inbox. Read-only, one channel, disconnect anytime.

Read it →
Finance 101July 3, 2026 · 8 min read

Garbage in, garbage out: keeping your QuickBooks clean

Every report, forecast, and decision you make sits on top of your bookkeeping — and a confident number built on messy books is more dangerous than no number at all. Here's what "garbage" actually looks like in QuickBooks, and the handful of habits that keep it out.

Read it →