🧠 AI Learning Hub

Hub › Lessons › Working with your data

Extra lesson · Working with your dataAbout 15 minutes

Upload a CSV file to Claude, ask questions, and check every answer

A CSV export from your bank, shop or timesheet app holds answers you need: what you earned last month, which product sells best, how many hours you can bill. Claude can read the file and answer in plain English. The risk is a confident number that is slightly wrong, because a blank cell, an "S$" in the wrong place or a client name typed two ways was handled in a way you did not expect. This lesson gives you one prompt that makes Claude check the file first, calculate with code, and hand you a spreadsheet formula so you can confirm each answer yourself.

What you will be able to do: give Claude a CSV file, get answers that list which rows were included and left out, and check every number with one formula in Google Sheets or Excel before you rely on it.

What you need

Before you upload

The steps

  1. Start a new chat in Claude and attach your CSV file. The Help Center article Upload files to Claude shows how on web, desktop and mobile.
  2. Paste the prompt below. Under "My questions", type two or three questions, each about something in the file.
  3. Read the file check first. Does the row count match what you expect? Are the first and last dates right? Do you agree with how each problem was handled? If not, reply with the correction, for example "the blank amount on order 1018 was 8.90", and ask Claude to answer again.
  4. Open the same CSV file in Google Sheets or Excel. Paste each check formula into an empty cell to the right of the data.
  5. If the formula gives the same number as Claude, you have two independent routes to the same answer. If it does not, paste both numbers back into the chat and ask Claude to explain the difference before you use either.

The prompt

Copy it as it is, then add your questions at the end.

Copyable prompt for Claude
The attached CSV file is my data. Answer my questions at the end using only this file.

First, check the file and tell me:
- how many rows and columns it has, and the column names
- the first and last date
- any problems: blank cells, numbers stored as text, the same name spelled two ways, or values that look unusual
For each problem, say how you handled it.

Then answer each question:
- Calculate with code. Do not estimate or retype the numbers.
- Give the answer, which rows you included, which you left out, and why.
- Give one spreadsheet formula I can paste into Google Sheets or Excel to check the answer myself. Assume I open the file as it is, with the headers in row 1, and that the dates become real dates. Use DATE() for date ranges, not text matching. Make the formula cope with the problems you found.
- If the file cannot answer a question, say so instead of guessing.

My questions:
1. 

Questions that work well

Avoid questions the file cannot answer, such as "why did sales go up?". A sales export shows what happened, not why. The prompt asks Claude to say so rather than guess.

Worked example

We ran the prompt on 10 November 2026. The shop data is made up for illustration: 98 orders from September and October 2026 for a small online shop, with columns order_id, date, product, qty, amount_sgd, status. We built five problems into it:

The questions were: (1) paid revenue in October 2026 compared with September, (2) the product with the most paid revenue across both months, and (3) how many orders were refunded.

The file check (excerpt, as returned)

Problems Claude reported, and how it handled them. On a phone, scroll the table sideways.

ProblemWhereHow Claude handled it
Blank amountOrder 1018Left it out of revenue rather than invent a number; noted it was probably 8.90 and that September would be S$1,159.40 if so
Number stored as textOrder 1053, S$90.00Removed "S$", counted 90.00, and noted it matches 2 × 45.00
Number stored as textOrder 1098, "1,350.00"Removed the comma, counted 1,350.00
Name spelled two waysOrder 1031, content plannerTreated it as the same product
Unusual valueOrder 1098, qty 30Kept it, but showed every answer with and without it, and asked us to confirm it is real

The answers (shortened)

Question 1 as returned. On a phone, scroll the table sideways.

Sept 2026Oct 2026Change
As the file standsS$1,150.50S$3,049.50+S$1,899.00 (+165%)
Without order 1098S$1,150.50S$1,699.50+S$549.00 (+48%)

Question 2: Logo starter kit, S$2,790.00, and still first without order 1098 (S$1,440.00). Question 3: 10 refunded orders, 4 in September and 6 in October. Claude added that the file does not say whether refunds were full or partial, which is true.

The check formula it gave for October, which copes with the blank cell, the "S$" and the comma:

Check formula from the example
=SUMPRODUCT((B2:B99>=DATE(2026,10,1))*(B2:B99<DATE(2026,11,1))*(TRIM(F2:F99)="paid")*VALUE("0"&SUBSTITUTE(SUBSTITUTE(E2:E99,"S$",""),",","")))

In a spreadsheet that read the file with day-first dates, this formula returned 3,049.5, the same as Claude's answer.

We also ran a second illustrative file: a month of time entries for three clients, with a client name that had a trailing space, another in lower case, a blank hours cell and one billable flag typed as y instead of Y. Claude found all four problems in each run and gave the same billable hours per client as our own script.

What we found in testing

Watch out for

Next step

How we checked this lesson