Skip to main content
All notes

How to Use ChatGPT Work to Combine Multiple Excel Files into One Report

Combine Excel files with ChatGPT Work, map different columns, identify duplicate transactions, and reconcile the totals. Includes sample files and prompts.

Share

Share to Instagram Stories

Preparing image…

  1. The link is copied.
  2. Download the image, then post it to Instagram Stories from your phone.
  3. Add a Link sticker to your Story and paste the link.
Download image

Instagram Stories can only be posted from the phone app.

Share to TikTok

Preparing image…

  1. The caption and link are copied.
  2. Download the image, then post it as a photo on TikTok.
  3. Paste the caption before you post.
Download image

Easiest to post from the TikTok app on your phone.

Hands typing on a laptop displaying a spreadsheet on a work desk

To combine multiple Excel files with ChatGPT Work, attach the source files, ask it to inspect each file's structure, and specify the rules for combining them and the report you need. Once the result is ready, reconcile its row counts and totals with the sources. A polished report still needs checking.

Imagine three branches sending their own sales reports. Column names may differ, a transaction may be submitted twice, and a Total column may already include quantity. If the instruction is simply "combine everything," the AI may make those decisions without you noticing.

I prepared three sample files with fictional data so you can follow the steps and verify the numbers. They contain no customer information or client sales data.

Download the three sample files

Download these files into one folder:

The branch names mean North, South, and West in Indonesian. Each file has a sheet named Penjualan with four transaction rows. The Barat file uses different headers, including order_id and nilai_penjualan. The Selatan file deliberately includes a copy of Utara's transaction U002. Resubmitted records like this can cause revenue to be counted twice.

Preview of four fictional Utara transactions with order ID, date, branch, product, quantity, total, and status columns
Preview of the workbook prepared for this tutorial, with Indonesian column labels. All transactions are fictional; Total is the amount per transaction in Indonesian Rupiah. This is a workbook preview, not a screenshot of ChatGPT output.

For real company data, prepare a copy containing only the columns needed. Customer names, bank account numbers, and phone numbers are unnecessary for a branch-level summary. I discuss the considerations in Is It Safe to Paste Company Financial Data into ChatGPT?.

Open Work and attach the source files

In ChatGPT, choose Work, then use the file attachment button to add all three workbooks. Wait until the attachments are available before sending instructions. Button placement may differ between the web and desktop apps.

OpenAI's official web guide positions Work for multi-step tasks such as analysis and spreadsheet creation. If you are unsure when to use Chat or Work, start with the comparison for office work.

Begin by inspecting the sources:

Inspect the three attached Excel files. All data is fictional and for practice.

For each file, show:
1. The filename and sheet names you can actually access.
2. The number of transaction rows, excluding the header.
3. The column names and three sample rows.
4. Structural or formatting differences that need resolving.

Do not combine or change the data yet. If any file cannot be read, name it
and stop before calculating a combined total.

You are looking for three readable files, four transactions in each, and different column names in the Barat file. Resolve any unreadable file first. See ChatGPT Cannot Read Your Excel File? for troubleshooting.

Define the rules for combining the data

Once the sources are clear, send this instruction:

Combine the three files into rekap-penjualan.xlsx.

Rules:
- All sales amounts are in IDR. Total and nilai_penjualan already contain
  the transaction amount. Do not multiply them by Qty or jumlah again.
- Map order_id to ID Pesanan, tanggal_transaksi to Tanggal,
  cabang to Cabang, nama_produk to Produk, jumlah to Qty,
  nilai_penjualan to Total, and status to Status.
- Preserve IDs as text and dates as Excel dates.
- For this exercise, ID Pesanan is unique across all branches.
- If an ID and all its transaction values match, flag one copy as a duplicate
  and count the transaction only once in the summary.
- If an ID matches but its values differ, do not resolve it yourself.
  Show the conflict for review.
- Do not invent missing values or change the source files.

Output sheets:
1. Data_gabungan: all source rows, plus the source filename and a flag showing
   whether each row is included in calculations. Keep duplicate rows visible.
2. Ringkasan: sales and unique transaction counts by branch, plus totals.
3. Catatan: column mappings, duplicates, conflicts, and before/after reconciliation.

Use formulas referencing the combined data for the summary.
Check the result and provide a downloadable XLSX file.

The unique-ID rule applies to this exercise. In a real system, two branches might both have order 001. The key may need a combination of branch and order ID, or a transaction ID from a central system. Do not remove a row merely because its number matches another.

Reconcile against the reference values

These reference values were calculated from the sample files. Use them to check your result:

CheckReference value
Source rows, excluding headers12
Total before excluding the duplicateRp2,100,000
Copy excluded from the summaryU002, Rp200,000
Unique transactions11
Utara salesRp500,000
Selatan salesRp600,000
Barat salesRp800,000
Total sales after reconciliationRp1,900,000

There are two straightforward checks: 12 rows minus one duplicate copy gives 11 transactions, and Rp2,100,000 minus Rp200,000 gives Rp1,900,000. The three branch totals must also equal the final total.

Do not include this answer key in your first prompt. Let the data be calculated, then compare. If the result differs, ask the AI to show the rows and formulas responsible for the difference.

Reconcile the row counts and sales amounts from the source files to the final
summary. Explain every row excluded from calculations. Show the branch-total
formulas and confirm that their sum equals the combined total.

Check the downloaded workbook

Open the output in Excel or your spreadsheet application. Confirm that the requested sheets exist, transaction U002 remains traceable, dates can be filtered, and Total contains numbers that can be summed. Check that summary formulas use the right data ranges.

A neatly formatted currency value does not prove the underlying cell is numeric. Numbers stored as text can produce different formula results. Row counts also need context: the combined-data sheet can still have 12 rows because source copies are preserved, while the summary counts 11 unique transactions.

For revisions, specify the sheet, column, and expected result. OpenAI's guide to working with files also recommends reviewing generated files and requesting focused changes.

When to use Work and when to automate the process

This approach suits occasional summaries, data needing an initial review, or reports whose format is still changing. If the same job runs every morning with stable rules, a scheduled workflow from the source system may be more appropriate. Work can still help with analysis while the routine collection and consolidation are handled by the system.

For an example of a scheduled data flow, see syncing MySQL to Google Sheets. To decide whether your reporting is ready for automation, read the five questions to ask before automating monthly reports.

If your team still combines reports manually and you want to identify what can be cleaned up or automated, tell me about your data.

Cover photo: Bluestonex on Unsplash, used under the Unsplash License. The photo illustrates spreadsheet work; it does not show ChatGPT Work. The sample files and workbook preview were prepared for this tutorial.

Found this useful? Share it with a friend or your team.

Share

Share to Instagram Stories

Preparing image…

  1. The link is copied.
  2. Download the image, then post it to Instagram Stories from your phone.
  3. Add a Link sticker to your Story and paste the link.
Download image

Instagram Stories can only be posted from the phone app.

Share to TikTok

Preparing image…

  1. The caption and link are copied.
  2. Download the image, then post it as a photo on TikTok.
  3. Paste the caption before you post.
Download image

Easiest to post from the TikTok app on your phone.

Is your team still doing something by hand?

Tell me about it, and let's find the fix together.