Drowning in sales spreadsheets? How to combine and analyze them with AI
Hi, this is Vivek, building Contextflo. I share practical notes on getting answers from your data, a couple of times a month.

Combining sales spreadsheets is two jobs, and people only budget for the second. The first is getting every file into the same shape: one header row, one row per sale, the same column names, the same date format, no subtotal rows, and a column that says which file each row came from. Once they match, stacking them is trivial, whether you use Power Query, a Claude chat, or copy and paste. Then check the combined table against the files it came from, row counts and totals per file, because a file counted twice looks exactly like a great month.
Why the files won't just stack
Four regional managers send four monthly exports. They came from the same CRM or the same POS, so they should line up. They don't, and it's usually the same handful of reasons:
- Column names differ. "Amount", "Net Sales" and "Revenue (USD)" are the same thing, and "Customer" in one file is "Account" in the next.
- Columns sit in a different order, so pasting one file under another puts rep names in the date column.
- Dates come in as 03/09/2026 in one file and 9/3/2026 in another. One of them is March 9 and the other is September 3, and a spreadsheet will guess without telling you.
- Amounts arrive as text ("$1,240.00"), in different currencies, or with and without tax.
- Someone added subtotal and grand total rows under each rep. Stack that file and the region counts twice.
- Merged header cells, or two header rows ("Q3" across the top, months underneath), which no tool reads cleanly.
- One tab per month in the same workbook, so September is a tab, not a date.
- The same sale appears in two exports, because this month's file overlaps last month's by a week, or a manager sent the file twice.
None of these throw an error. They just make the total wrong.
Get every file into the same shape
This is the checklist to run on each file before combining, whoever does the combining:
- One header row at the top, nothing merged, nothing above it.
- One row per transaction. Delete subtotal, total and blank spacer rows.
- The same column names in every file. Pick the list once and rename to it.
- Dates as real dates in one format. Year-month-day (2026-09-03) is the one nobody misreads.
- Amounts as numbers, in one currency, with tax treated the same way everywhere.
- Consistent keys. Rep, store and product should be spelled the same across files, ideally by ID rather than name.
- A source column saying which file (or tab) each row came from. You'll need it for every check that follows.
- If each month is a tab, add a month column before you lose that information.
The source column is the one people skip. If I could keep only one item on this list it would be that one, because it's how you find the bad file later.
Stacking or joining?
"Merge these spreadsheets" can mean two different operations, and choosing wrong gives you a table that looks fine and isn't.
| Stacking (append) | Joining (lookup) | |
|---|---|---|
| What it does | Puts rows from files with the same columns under each other | Adds columns to each row by matching a key in another table |
| Sales example | North, South, East and West files into one list of sales | Look up each rep's region and quota from a rep list |
| Excel equivalent | Power Query Append, or copy and paste | XLOOKUP, or Power Query Merge |
| How it goes wrong | Mismatched columns, duplicate rows | Keys that don't match exactly, a rep listed twice multiplying their sales |
A sales roll-up is almost always a stack first, with a lookup or two on top. If you join the regional files to each other, you'll get a wide mess or a multiplied total.
Once it's one table: this September against last September
The first thing most people ask of a combined sales table is how this month compares to the same month last year. With one combined table that has a real date column, it's a group by year and month, then the two Septembers side by side, split by region or store.
Two checks keep it honest. Like for like: a store that opened in March has no last September, so compare the stores that existed in both years separately from the total. And selling days: a month with one more weekend or a holiday that moved can swing a store's number without anything changing. If the change is big and you want to know why, why did my sales drop breaks it into orders, order value and mix.
That comparison needs last year's files in the same shape as this year's, which is usually the real work.
The quick way: hand the pile to Claude
Upload the files to a Claude chat, CSV or Excel, though Excel files need code execution and file creation turned on in your settings. Claude caps how many files a chat can hold and how large each one can be, so check Anthropic's current upload limits before you upload a big batch.[1] Then go in steps rather than asking for the finished table in one prompt.
These are four regional sales exports for September. Before combining
anything, give me a mapping table: each file's column names, the
standard name you'd map them to, and anything you can't map. Flag date
formats, text amounts, currencies, subtotal rows, merged headers and
anything else that would stop the files stacking cleanly.
Read the mapping. This is where you catch "Amount" in one file being gross and in another being net, which Claude can't know unless you tell it.
Use that mapping. Drop subtotal and total rows, convert dates to
YYYY-MM-DD and amounts to numbers in USD. Add a source_file column.
Stack them into one table, remove rows that are exact duplicates,
and give me the combined file as CSV.
Now reconcile: for each source file, show rows in the original, rows
dropped (and why), rows in the combined table, and total amount before
and after. Then flag any file whose row count or total is out of line
with the others.
The third prompt is the one that earns its keep. It turns "looks about right" into a table you can check against what each manager thinks they sold.
Where it runs out
A chat is a one-off. Next month, you upload four new files and Claude works out the mapping again, maybe slightly differently, and September's rules quietly don't apply to October. Nobody else on the team can ask the combined table anything unless you send them the file. And comparing to last year means uploading last year's twelve months too, which starts to crowd Claude's chat file limit fast.
Keep the pile in one place with Contextflo
Upload each region's CSV to Contextflo (save Excel workbooks as CSV first), or connect the Google Sheet the managers already fill in, and Claude or ChatGPT can read all four together from then on, plus your warehouse too if you have one. When a manager sends a corrected file, re-uploading it just replaces the data.
The part that matters for next month is saving the combining rules once: the column mapping, and that East's subtotal rows always get dropped before stacking. October's roll-up uses September's rules, and so does anyone else who asks. (For one file on its own, a chat upload is simpler; query a CSV with Claude covers that.)
When the spreadsheets should stop being spreadsheets
If the same files arrive every month and more than one person depends on the roll-up, the cleanest fix is upstream. The regional files were exported from something, a CRM, a POS, an order system, and syncing that system straight into a warehouse removes the export step and the mapping problem together.
If the spreadsheet itself is the source, because managers type into it, a connector can still load it on a schedule. Fivetran's Google Sheets connector syncs a named range in a file to a destination table and keeps checking it for changes on the frequency you set.[2] Airbyte's Google Sheets source syncs each tab of a spreadsheet as its own stream, with every column arriving as a string, so dates and amounts still need converting in the warehouse.[3] Either way, the shape checklist above still applies; a connector copies a messy sheet faithfully.
Worked example: four regions, one file sent twice
The numbers are made up for illustration. A distributor's ops lead gets September sales from four regions. North and South send CSVs, East sends an Excel workbook with subtotal rows under each rep, and West sends a CSV with amounts as text like "$1,240.00". The column names don't match across any two files.
The mapping prompt catches the headers, the text amounts, the South file's day-first dates and East's 12 subtotal rows. The combined table comes to $955,200, well above the roughly $750,000 the regional managers reported. The reconciliation shows why:
| Source file | Rows in | Rows dropped | Rows out | Total |
|---|---|---|---|---|
| north_sept.csv | 412 | 0 | 412 | $184,300 |
| south_sept.csv | 388 | 0 | 388 | $171,900 |
| east_sept.xlsx | 457 | 12 subtotal rows | 445 | $196,200 |
| west_sept.csv | 1,212 | 0 | 1,212 | $402,800 |
West has twice the rows of any other region. Every order ID in the file appears exactly twice, with identical values, because the West manager pasted two copies of the same export into one file. The exact-duplicate rule didn't catch it because the two copies had different "exported at" timestamps, so the rows weren't exact matches. Deduplicating on order ID alone brings West to 606 rows and $201,400, and the total to $753,800, within a rounding error of what the managers reported.
Without the per-file table, the ops lead would have reported September 27% higher than it was. Had East's subtotal rows gone in too, East alone would have doubled to $392,400. Neither mistake shows up in the combined total, which only tells you the number. The breakdown by source file tells you whether to believe it.
FAQ
How do I combine multiple sales spreadsheets into one? Get every file into the same shape first: one header row, one row per sale, the same column names and date format, no subtotal rows, and a source column saying which file each row came from. Then stack them on top of each other. You can do this in Excel with Power Query, or upload the files to Claude and ask it to map the columns and stack them. Either way, check the row count and total per file afterwards.
Can Claude merge Excel files? Yes. Upload your files to a Claude chat, CSV or Excel (Excel needs code execution and file creation turned on), and ask it to standardize the columns and combine them. Claude caps how many files a chat can hold and how large each one can be, so check Anthropic's current upload limits before a big batch. Ask for a column mapping table before the combined file, and a per-file reconciliation of row counts and totals after it, so you can catch a file that was dropped or counted twice.
What is the difference between appending and merging spreadsheets? Appending, or stacking, puts files with the same columns on top of each other, like one sales file per region into one list of sales. Merging, or joining, adds columns from another table by matching a key, like looking up each rep's region from a rep list. Most sales roll-ups are an append, with a lookup or two on top.
How do I compare this month to the same month last year in a spreadsheet? Combine both years into one table with a proper date column, then group sales by year and month and compare the same month side by side. Check the two months are like for like: the same regions and stores in both years, and a similar number of selling days. A pivot table does it in Excel, or ask Claude to build the comparison from the combined file.
Find out if Contextflo is the right fit for you.
See how teams use Contextflo
Related posts
Keep reading

Conversational analytics: 5 ways to set it up, compared
7 min read

How to connect Claude to BigQuery (and fix the errors you'll hit)
8 min read

How to connect Claude to Postgres (and keep it read-only)
7 min read

How to build a BI dashboard with Claude that your team can actually trust
8 min read

How to give Claude read-only access to your database (it isn't always the default)
7 min read

You connected your warehouse to Claude, now what?
5 min read

Why we built our own Postgres MCP server
7 min read

What should go in the board deck this month? How to pull metrics from HubSpot and Stripe with AI
7 min read

Which closed deals churned within a year? How to connect HubSpot and Stripe with AI
8 min read




