Back to Mercury in Excel
SheetXAI logo
Mercury logo
Mercury · Excel Guide

Build a Category Spend Summary From Mercury Transactions in an Excel workbook

2026-05-14
5 min read

The Scenario

The quarterly budget review is Thursday. The head of finance asked you to put together a category-level spend breakdown from Mercury — not the raw transaction list, but total spend per category from last quarter, sorted from largest to smallest. You've done this before in Excel. The process: export a CSV from Mercury, open it, discover that three rows have blank categories, clean those, build a pivot table, reformat the pivot output into a table the CFO can read, move it into the report workbook. Start to finish: about 40 minutes, assuming Mercury doesn't change the CSV column order again.

The bad version:

  • Export Q2 transactions from Mercury as CSV, open in Excel, clean blank category values
  • Build a pivot table with category as rows and sum of amount as values
  • Copy-paste the pivot output as values into the board report workbook, reformat column widths

The quarterly review is not a rehearsal. The CFO will ask follow-up questions that require the underlying data to be accurate, not estimated.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Excel workbook. It connects to Mercury and can pull transactions, group them by category, and write a summary table into a separate worksheet — no CSV, no pivot table required.

Pull all Mercury transactions with status 'sent' from the last 90 days, write them into Sheet1 with date, description, amount, and category, then in Sheet2 write a unique list of categories with total spend per category sorted largest to smallest

What You Get

  • Sheet1: raw transaction data — one row per transaction with date, description, amount, and Mercury category
  • Sheet2: category summary — category names in column A, total spend in column B, sorted descending

What If the Data Is Not Quite Ready

Some categories are blank — I need them grouped as Uncategorized

Pull all Mercury transactions from Q2 2025 into Sheet1 with date, description, amount, and category — replace any blank category values with 'Uncategorized' — then in Sheet2 write the category spend summary sorted largest to smallest

I want a month-by-category breakdown

Fetch all Mercury transactions from the current calendar year and group by month and Mercury category in this workbook — rows are months, columns are categories, values are total spend

Compare spend by category across Q1 and Q2

Pull Mercury transactions from Q1 2025 into Sheet1 and Q2 2025 into Sheet2 with date, description, amount, and category, then in Sheet3 write a category comparison: column A is category, column B is Q1 total, column C is Q2 total, column D is the difference

Full budget review prep in one shot: raw data, summary, top 5 flagged

Pull all Mercury transactions with status 'sent' from Q2 2025, write raw data into Sheet1, write a category spend summary sorted descending into Sheet2, and in Sheet3 write only the top 5 categories by spend labeled 'Top Spend Areas'

The budget review slide writes itself when the summary is already built in the format the deck expects.

Try It

Get the 7-day free trial of SheetXAI and open your quarterly budget Excel workbook, then ask it to pull Mercury transactions and build the category breakdown. For pulling the raw transaction export that feeds into this summary, see the transaction export spoke.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more