Tabellab

The Spend Cube: Category × Supplier with SUMIFS

Lesson 1 of 20Lab

All lessons

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 20 is free. Unlock all 20 hands-on labs, the final exam and your certificate.

Buy course — €9.90
Loading the spreadsheet…

Why every procurement savings project starts with a spend cube

Ask a finance director how much the company spends on packaging and you will often get a pause, then a guess. Ask which suppliers that money goes to and the pause gets longer. Yet every serious procurement decision, from consolidating suppliers to launching a tender or negotiating a framework contract, depends on that answer. Spend analysis is the discipline of answering it with data instead of memory, and its first and most important tool is the spend cube.

This free first lesson is for buyers, category managers, procurement analysts, controllers and owners of small and mid-sized companies who have a purchase-order or invoice export and want to turn it into a clear picture of where the money goes. You will use the same fictional food manufacturer as the lab above, Alderbrook Foods, and its 18 purchase-order lines for Q3 2026. By the end you will know how to build a category × supplier matrix with one SUMIFS formula, how to reconcile it, and how to read it for savings opportunities.

The idea is simple, but it is also where most real spend analyses go wrong. Supplier names are spelled three ways, categories are missing, and the totals do not match the ledger. A cube that does not reconcile is worse than no cube at all, because it looks authoritative. So this lesson treats reconciliation as part of the method, not an afterthought.

What a spend cube is, in plain words

A spend cube answers three questions at once: what do we buy (category), from whom (supplier) and who buys it (business unit, plant or cost center). Put category in the rows, supplier in the columns and spend in the cells, and you have the two-dimensional slice of the cube that you build in this lab. Add business unit as a filter or a third axis and it becomes the full cube.

Each cell is one question: "How much did we spend on this category with this supplier?" In Excel that is a SUMIFS with two criteria:

=SUMIFS(amounts, category column, this row's category, supplier column, this column's supplier)

The trick that makes one formula fill the whole matrix is the mixed reference. In cell B23 you write $A23 for the category, which locks column A but lets the row change as you copy down, and B$22 for the supplier, which locks row 22 but lets the column change as you copy right. The data ranges get full dollar signs, $D$2:$D$19, so they never move. Write the formula once, copy it across 20 cells, and every cell asks the right question.

Categories need a taxonomy. Real companies classify spend with a category tree, often based on a standard such as UNSPSC or an internal list. The lab uses four simple categories (Packaging, Raw materials, Logistics, MRO for maintenance, repair and operations). The method is the same with forty.

Worked example: Alderbrook Foods, Q3 2026

Alderbrook Foods bought from five suppliers in the quarter. The 18 PO lines add up to $944,760. Here is the spend cube you build in the lab, with category totals and shares on the right and supplier totals at the bottom:

CategoryHarlowRidge GrainVantorClearwellBrightwellTotalShare
Packaging185,470––9,8607,430202,76021.5%
Raw materials–300,800–273,070–573,87060.7%
Logistics–6,980119,930––126,91013.4%
MRO3,150–––38,07041,2204.4%
Total188,620307,780119,930282,93045,500944,760100.0%
Alderbrook Foods spend cube, Q3 2026, in $ (fictional data from the lab). The grand total reconciles with the PO total of $944,760.

The formulas behind the table, exactly as in the lab:

  • Cube cell B23, copied to B23:F26: =SUMIFS($D$2:$D$19,$C$2:$C$19,$A23,$B$2:$B$19,B$22)
  • Category total G23, copied down: =SUM(B23:F23) (or =SUMIFS($D$2:$D$19,$C$2:$C$19,$A23) as an independent check)
  • Category share H23, copied down: =G23/$G$27, formatted as percent
  • Reconciliation: G27 must equal D20. A check cell =G27-D20 should show 0.
  • Average PO line in Logistics: =AVERAGEIFS(D2:D19,C2:C19,A25) = $31,727.50

HarlowRidge GrainVantorClearwellBrightwellPackaging185k––10k7kRaw materials–301k–273k–Logistics–7k120k––MRO3k–––38k0< 20k20–100k100–200k> 200kSpend in $, Q3 2026, one SUMIFS per cell
The spend cube as a heatmap. Dark cells show where the money is concentrated, and the scattered light cells in Packaging, Logistics and MRO are the ones a buyer should ask about.

Now read the cube like a category manager. Four observations jump out, and each one is a concrete conversation for the next sourcing meeting:

  1. Raw materials is 60.7% of spend and split between two suppliers, Ridge Grain ($300,800) and Clearwell ($273,070). That is a deliberate dual-sourcing pattern, good for supply security. The lever here is price benchmarking and volume allocation between the two, not consolidation.
  2. Packaging is dominated by Harlow ($185,470 of $202,760, about 91%), but two other suppliers sold small amounts of packaging: Clearwell $9,860 and Brightwell $7,430. Those are typical "tail" purchases. Moving them to Harlow under the existing contract may get a better price and fewer invoices to process.
  3. Ridge Grain appears in Logistics with $6,980. A grain supplier billing freight is not wrong, but it is worth checking: is the freight included in the delivered price elsewhere, is it charged at a fair rate, and should it go through Vantor, the logistics provider?
  4. Brightwell spans two categories, MRO and Packaging, and Harlow also appears in MRO with $3,150. Suppliers that cross categories are candidates for one umbrella agreement, or for a check that the category coding on the PO is right.

0100k200k300k400k500k600kRaw materials574k · 60.7%Packaging203k · 21.5%Logistics127k · 13.4%MRO41k · 4.4%HarlowRidge GrainVantorClearwellBrightwell
Spend per category, stacked by supplier, with the category share. Raw materials alone is more than the other three categories together.

None of these observations required advanced statistics. They required the data in the right shape. That is the real value of the spend cube: it turns a list of transactions that nobody can read into a picture that suggests actions. In the rest of the course you quantify those actions with Pareto analysis, price variance, scorecards and total cost of ownership.

Going further: line counts and the third dimension

Spend in dollars is only half the story. A second matrix with the same layout but COUNTIFS instead of SUMIFS shows how many PO lines sit behind each cell: =COUNTIFS($C$2:$C$19,$A23,$B$2:$B$19,B$22). Many lines with small values point to process cost. Every PO line means an approval, a goods receipt, an invoice to match and a payment to run, so a category with a high line count and a low total is often a better target for a catalogue, a purchasing card or a framework order than for a price negotiation.

Divide the spend matrix by the count matrix and you get the average value per PO line in each cell. At Alderbrook the Logistics average is $31,727.50, which you calculate in the lab with AVERAGEIFS. Comparing that with the MRO average, $10,305 over four lines, shows the difference between a few large freight contracts and a stream of small maintenance purchases. For example, a buyer might decide that MRO purchases below a certain value should go through an online catalogue rather than individual POs, while freight is handled through a tender.

The third axis of the cube is usually the business unit, plant or cost center. In Excel you add it as a third criterion: =SUMIFS($D$2:$D$19,$C$2:$C$19,$A23,$B$2:$B$19,B$22,$E$2:$E$19,$J$1), where J1 holds the plant you want to look at. Change J1 with a drop-down list (Data › Data Validation › List) and the whole matrix updates. That is a simple, transparent way to slice the cube without building a full BI model, and it makes a good discussion tool in a meeting with plant managers who each believe their spend is under control.

Time is the fourth common dimension. Add a month or quarter column to the data and the same structure compares Q2 and Q3 spend per category, which is often the first sign that a contract price changed or that volume moved to another supplier.

How to build a spend cube in Excel, step by step

  1. Export PO or invoice lines. You need at least supplier, category and amount per line. Invoice data shows what you actually paid; PO data shows what you committed. Pick one source for one analysis and say which.
  2. Clean the supplier names. "Harlow Packaging", "Harlow Packaging Ltd" and "HARLOW PACK." are one supplier. Add a helper column with a cleaned name, using TRIM, PROPER and a mapping table with XLOOKUP. This is often the most time-consuming step of a real spend analysis.
  3. Check the categories. Every line needs exactly one category. Find blanks with Home › Find & Select › Go To Special › Blanks, or count them with =COUNTBLANK(C2:C19).
  4. Lay out the matrix. Category names in A23:A26, supplier names in B22:F22. You can generate unique lists with =UNIQUE(C2:C19) and =TRANSPOSE(UNIQUE(B2:B19)) in Excel 365.
  5. Write one SUMIFS in B23. Type =SUMIFS(, select D2:D19 and press F4 once for $D$2:$D$19. Do the same for the criteria ranges. For the criteria cells, press F4 three times on A23 to get $A23 and twice on B22 to get B$22.
  6. Fill the matrix. Select B23:F26 and press Ctrl+Enter after typing, or copy B23 and paste into the whole block. Then press Ctrl+R and Ctrl+D to fill right and down if you prefer.
  7. Add totals and shares. Row and column totals with Alt+= (AutoSum), shares with =G23/$G$27 and Ctrl+Shift+%.
  8. Reconcile. Put =G27-D20 in a visible check cell. If it is not zero, a supplier or category in the data does not appear in the matrix headers. =SUMPRODUCT(--ISNA(MATCH(B2:B19,B22:F22,0))) counts the lines whose supplier is missing.
  9. Visualise. Select B23:F26 and use Home › Conditional Formatting › Color Scales for a heatmap. For the stacked bar, select A22:F26 and choose Insert › Bar › Stacked Bar.
With many thousands of lines, a PivotTable does the same job faster: Insert › PivotTable, Category in Rows, Supplier in Columns, Sum of Amount in Values, then Show Values As › % of Grand Total for the shares. The SUMIFS version remains useful because it keeps a fixed layout that charts and reports can point to.

Procurement spend analytics workbook with a category by supplier spend cube, a supplier Pareto chart and a scorecard in Excel
From PO lines to sourcing decisions: the spend cube is the first view, and the rest of the course adds Pareto, PPV, scorecards, TCO and tender evaluation.

Common mistakes and how to spot them

  • The cube does not reconcile. Cause: a supplier spelled two ways, a trailing space or a category not in the headers. Spot it: the check cell =G27-D20 is not 0. Fix the master data, not the formula.
  • Wrong reference type. Writing A23 instead of $A23 shifts the criteria as you copy right, and every column then looks at the wrong category. Spot it: click a cell in column F and check that it still refers to column A and row 22.
  • Ranges of different sizes. SUMIFS needs the sum range and criteria ranges to have the same shape, otherwise it returns #VALUE!.
  • Dividing shares by the wrong total. A category share must divide by the grand total in $G$27, not by a supplier total or by the unlocked G27, which slides down as you copy.
  • Using AVERAGE for a filtered average. =AVERAGE(D2:D19) gives the average of all lines ($52,487), not the Logistics average. Use AVERAGEIFS.
  • Mixing PO and invoice data. Committed and paid amounts differ by timing, partial deliveries and credit notes. Mixing them double-counts some spend.
  • Forgetting VAT and currency. Compare spend net of recoverable VAT and in one currency. Convert with a fixed rate table and say which rate you used.

Quick reference: functions and shortcuts

Function or shortcutPurpose in spend analysisExample
SUMIFSSpend for one category and one supplier=SUMIFS($D$2:$D$19,$C$2:$C$19,$A23,$B$2:$B$19,B$22)
AVERAGEIFSAverage PO line in a category=AVERAGEIFS(D2:D19,C2:C19,"Logistics")
COUNTIFSNumber of PO lines per cell=COUNTIFS($C$2:$C$19,$A23,$B$2:$B$19,B$22)
UNIQUE, TRANSPOSEBuild the header lists (Excel 365)=TRANSPOSE(UNIQUE(B2:B19))
TRIM, PROPERClean supplier names=PROPER(TRIM(B2))
XLOOKUPMap name variants to one supplier=XLOOKUP(B2,Map[Variant],Map[Clean],B2)
F4Cycle $A$1, A$1, $A1, A1Mixed references in the cube
Alt+=AutoSum totalsRow 27 and column G
Ctrl+Shift+%Percent formatShare column H
English Excel function names. On a Mac use Cmd where Windows uses Ctrl.

Real-world uses of the spend cube

  • Supplier consolidation. Categories with many small suppliers, like Alderbrook's packaging tail, are the classic place to bundle volume with one or two preferred suppliers.
  • Preparing a negotiation. Before meeting a supplier, know your total spend with them across all categories. Clearwell sells Alderbrook both raw materials and packaging, and the combined $282,930 is a stronger argument than either part alone.
  • Budgeting and forecasting. Category totals from the cube are a natural baseline for next year's purchasing budget and for tracking actual against plan.
  • Risk review. A category where one supplier holds most of the spend is a dependency. The cube shows those concentrations at a glance and starts the conversation about second sources.
  • Audit and compliance. Unexpected cells, such as freight from a grain supplier, are where coding errors, unapproved purchases or off-contract buying tend to hide.

What you will build in the rest of this course

Lesson 1 is free. The other 19 lessons are part of the full course ($9.90 one-time), each with an interactive lab on Alderbrook's data and Coach feedback on every step.

Supplier Pareto & Tail Spend. You rank the suppliers by spend, build the cumulative percentage, count how many suppliers make up 80% of the spend, size the tail and draw the Pareto chart that procurement teams use to decide where to focus.

Purchase Price Variance, Cost Reduction & Cost Avoidance. You calculate PPV against standard cost and split the year's negotiation results into hard savings that reduce the budget and cost avoidance that only prevents an increase, a distinction finance will ask you about.

Supplier Scorecard: Normalised KPIs, Weights & Rank. You turn raw supplier KPIs such as on-time delivery, defect ppm and a price index into 0–100 scores, weight them with SUMPRODUCT and rank six suppliers fairly.

Should-Cost Model: What the Part Ought to Cost. You rebuild a supplier's price from materials, labour, machine time, overhead and margin, and measure how far the quote sits above your should-cost before you negotiate.

Total Cost of Ownership: Beyond the Unit Price. You compare three shrink-film suppliers on purchase price, freight, duty, inventory carrying, quality and audit costs, and find out whether the cheapest quote is really the cheapest roll.

Contract Compliance & Maverick Spend. You flag every invoice as on or off contract with XLOOKUP, then measure maverick spend, PO compliance and the negotiated savings that leak away.

Tender Evaluation: Price Normalisation & Weighted Award. You evaluate four bids for a three-year logistics contract, normalise prices, weight price and quality, pick the winner and chart how each score is built. The course ends with an exam and a certificate.

Summary: one formula, one picture, many decisions

A spend cube puts categories in rows, suppliers in columns and spend in the cells. One SUMIFS with mixed references, $A23 and B$22, fills the whole matrix. Totals, shares and a reconciliation check turn it into a number you can defend. At Alderbrook Foods it shows a dual-sourced raw materials category worth 60.7% of spend, a packaging tail that could move to Harlow, and a few cross-category cells worth a question.

Now scroll up to the lab and build the cube yourself: fill B23:F26 with one formula, add the totals and shares, reconcile with the PO total and calculate the average Logistics PO line. The Coach checks each step and tells you what to fix.

Frequently asked questions

What is a spend cube in procurement?

A spend cube is a view of spend by category, by supplier and often by business unit, built from purchase-order or invoice lines. It shows who you pay, for what and how much.

How do I build a category by supplier matrix in Excel?

Put categories in a column and suppliers in a row, then use one SUMIFS with two criteria and mixed references, for example =SUMIFS($D$2:$D$19,$C$2:$C$19,$A23,$B$2:$B$19,B$22), and copy it across the matrix.

Why does my spend cube total not match the PO total?

Usually a supplier name is spelled differently in the data and in the headers, or a category is missing from the matrix. Clean the names and check with a cell that subtracts the PO total from the cube total.

Should I use a PivotTable or SUMIFS for spend analysis?

Both work. A PivotTable is faster for large data, while SUMIFS keeps a fixed layout that formulas, charts and reports can point to reliably.

What is tail spend?

Tail spend is the many small purchases from many suppliers that together make up a small share of total spend. It is costly to manage and is often consolidated with preferred suppliers.

What does MRO mean in a spend analysis?

MRO stands for maintenance, repair and operations: spare parts, tools, lubricants, safety equipment and similar indirect items that keep a plant running but do not go into the product.

Keep going: Procurement & Spend Analytics

This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time €9.90.

  1. Supplier Pareto & Tail Spend
  2. Purchase Price Variance, Cost Reduction & Cost Avoidance
  3. Supplier Scorecard: Normalised KPIs, Weights & Rank
  4. Should-Cost Model: What the Part Ought to Cost
  5. Total Cost of Ownership: Beyond the Unit Price
  6. Contract Compliance & Maverick Spend
  7. Tender Evaluation: Price Normalisation & Weighted Award
  8. Clean the Supplier Master: Name Variants, Parent Groups & Unmapped Spend
  9. Spend Bridge: Splitting the Change into Volume and Price Effects
  10. Price Harmonisation: Same Item, Different Prices at Each Plant
  11. Supplier Rebates: Tier Tables, Retro vs Step Rebates & Accruals
  12. Payment Terms: Early-Payment Discounts, Implied Rates & Term Extensions
  13. Savings Pipeline: Stage Probabilities, In-Year Phasing & the Gap to Target
  14. Category Strategy: Profit Impact vs Supply Risk Portfolio Matrix
  15. Supplier Concentration: Category Shares, HHI & Dependency Flags
  16. Tail Spend Consolidation: Process Cost per PO, Catalogues & Payment Cards
  17. Commodity Exposure: Contracted vs Open Volume, Budget Variance & Price Shocks
  18. Procurement KPIs: Spend Under Management, PO Compliance & ROI
  19. Final Project: Category Priority Dashboard for Alderbrook

Buy course — €9.90 See the full course