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.

Meet your AI CFO →

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 →
Finance 101August 10, 2026 · 8 min read

Why your Shopify sales will never match your QuickBooks revenue

Your Shopify dashboard says one number, your P&L says another, and they never tie. That's not a bug — it's accounting. Here's the bridge from channel sales down to book revenue, line by line, and how to tell a normal gap from one that's actually a problem.

Read it →
ProductAugust 9, 2026 · 4 min read

Wauvel now reads your Shopify sales — meet your Sales Analyst

Connect your Shopify store in a few clicks and a new Sales section lands on your Command Center — net sales, orders, average order value, and a weekly trend. Read-only, and the first of a family: the Sales Analyst is source-agnostic, so Stripe, Faire, and more plug into the same view over time.

Read it →
Finance 101August 8, 2026 · 6 min read

Sales tax isn't revenue: the number that fools every online seller

Your store's "total sales" number includes the sales tax you collected — and that money was never yours. It's a liability you're holding for the state until you remit it, not revenue. Book it as revenue and you inflate your top line, distort your margins, and start spending cash you already owe.

Read it →
Finance 101August 7, 2026 · 8 min read

Planning cash for Q4: the inventory buy that breaks holiday brands

For a product brand, Q4 is where you make your year — and the cash math runs backwards. You pay for the holiday inventory in August, the revenue lands in December, and the cash from those sales lands later still. A profitable holiday can still punch a hole in your bank account in the middle. Here's how to find the trough before it finds you.

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

Get paid faster: how to cut your DSO and free cash you already earned

You already did the work and booked the sale — the money is just sitting in someone else's account. DSO measures how long. Here's how a CFO reads days sales outstanding, turns each day into dollars, and works down the number with a collections playbook that doesn't cost you a customer.

Read it →