Skip to content
SparkTime, home
AI From Zero to Productive
Lessons
1 · Understanding Modern AI
2 · Talking to AI Effectively
3 · AI for Learning
4 · AI for Work and Productivity
5 · AI for Developers
6 · AI for Career Growth
7 · Research, Verification and Responsible AI
8 · Automation and AI Agents
9 · Build Your Personal AI System
Lesson 15 of 35

Lesson 15 · AI for Work and Productivity

Spreadsheets and Data with AI: Analysis You Can Check

AI is excellent at explaining formulas, cleaning messy columns and suggesting how to analyse data, and unreliable as a calculator. This article shows how to have the AI propose the method while the spreadsheet or code does the arithmetic, with reconciliation checks and a worked example of a classic mistake.

On this page

Key takeaways

  • Use AI for the method, not the arithmetic. Let it explain, propose and write formulas or code, and let the spreadsheet or program compute the numbers.
  • Describe your columns and a few sample rows instead of uploading sensitive data. Anonymise or use made-up data when you only need a formula.
  • Test every formula on a small case where you know the answer, and reconcile totals, row counts and ranges after any AI-assisted change.
  • Watch for typical analysis errors, such as averaging averages, mixing units, treating blanks as zeros and confusing correlation with cause.
  • Ask the AI for assumptions and alternative explanations, then test them yourself. Do not accept causal claims or conclusions without evidence.

An analyst asks an assistant for the average order value across two regions. It suggests averaging the two regional averages. The spreadsheet shows a clean number, the chart looks fine, and the figure goes into a presentation. It is wrong. Nothing about the answer looked wrong, because arithmetic mistakes do not look like anything.

Spreadsheets and data are an area where AI can save real time, and where a quiet error can survive all the way into a decision. The way through is a division of labour: the AI proposes a method; a tool computes; you check.

What you will learn

#
  • What AI does well and badly with data.
  • A safe workflow for formulas, cleaning and analysis.
  • A runnable example of the "average of averages" mistake and how a simple check catches it.
  • A list of common analysis traps to ask about.
  • How to protect private data.

What it is good at, and what it is not

#

Good uses

Why

Poor uses

Why

Explaining what a formula does

Language task, easy to verify by testing

Doing sums, averages and percentages "in its head"

Models are unreliable at exact calculation

Writing a formula or short script for your described layout

You can test it

Reading a huge table pasted as text and giving totals

Parsing and arithmetic errors are likely

Suggesting how to structure or clean a dataset

A method you can inspect

Stating facts about your data that it has not computed

It may guess

Proposing which chart type suits a question

Judgment you can assess

Claiming why a trend happened

It can only offer hypotheses

Drafting a plain-language explanation of results you computed

Wording task

Producing numbers that look right

Hard to detect

Some products can run code on files you upload, which is different from the model computing in its head. The code can be inspected and re-run, which makes the results more trustworthy. Even then, read the code, check the assumptions, and test.

The safe workflow

#
  1. Describe the data, do not dump it. Give column names, types and three or four sample rows. This is enough for formulas and methods, and it avoids exposing everything.
  2. State the question precisely. "Total revenue per region for October" beats "analyse this".
  3. Ask for the method and the formula, with an explanation of each part.
  4. Test on a tiny example where you know the right answer.
  5. Apply it, and keep your original data untouched in a separate sheet or file.
  6. Reconcile. Check that totals, counts and ranges make sense (see below).
  7. Ask for assumptions and pitfalls, and decide which matter.
  8. Write the conclusion yourself, using AI for wording only after you trust the numbers.

An example prompt

#
Code
I have a sheet with columns: A order_id, B region (text), C order_date (dd/mm/yyyy,stored as text), D value (number, in rupees). Sample rows:1001, North, 03/10/2026, 12001002, South, 03/10/2026, 4501003, North, 05/10/2026, 980Question: total value per region for October 2026.Give me a formula for Google Sheets or Excel (say which you assume), explaineach part, and list any problems the text dates might cause.

You get a formula, an explanation, and importantly a warning that text dates may need converting first. Test it on these three rows, where you can total by hand.

Reconciliation: cheap checks that catch most errors

#

After anything AI-assisted touches your data, run these quick checks:

  • Row counts: same number of rows before and after cleaning, or a known, explained difference.
  • Totals reconcile: the sum of the parts equals the whole. Region totals add up to the grand total.
  • Spot-check three rows by hand, including the first and last.
  • Min, max and blanks: scan the extremes for impossible values (negative ages, a date in the year 3026).
  • Types: numbers stored as text will quietly drop out of sums.
  • Sensible magnitude: does the result match your rough expectation?

A worked example: the average of averages

#

Two regions: North had 10 orders worth Rs 1,000 in total, and South had 90 orders worth Rs 18,000. What is the average order value?

A tempting assistant answer: "North averages Rs 100 per order and South averages Rs 200, so the overall average is Rs 150." The arithmetic is correct and the method is wrong. The program computes both ways.

Python
# File: average_of_averages.pyimport csvimport ioDATA = """region,orders,total_valueNorth,10,1000South,90,18000"""rows = list(csv.DictReader(io.StringIO(DATA)))# The shortcut an assistant might suggest: average the two regional averages.regional_averages = [float(r["total_value"]) / int(r["orders"]) for r in rows]average_of_averages = sum(regional_averages) / len(regional_averages)# The correct overall average order value: total value divided by total orders.total_value = sum(float(r["total_value"]) for r in rows)total_orders = sum(int(r["orders"]) for r in rows)true_average = total_value / total_ordersprint("regional averages:", regional_averages)print("average of averages:", average_of_averages)print("true average order value:", true_average)
Code
regional averages: [100.0, 200.0]average of averages: 150.0true average order value: 190.0

The shortcut gives Rs 150 and the true figure is Rs 190, a difference of Rs 40, or about 21 percent of the true figure. Averaging the averages gives North's 10 orders the same weight as South's 90. Because most orders came from South, the real average must sit much closer to South's Rs 200.

How a check catches it. A reconciliation test: multiply the claimed overall average by the total orders, and compare with total value. 150 times 100 orders is 15,000, but the actual total is 19,000. They do not match, so the method is wrong. This "does it add back up?" test takes seconds and works on many kinds of mistakes.

A second example: messy dates and blanks

#

Not every data problem is a calculation. Many are about cleaning, where the quiet errors come from assumptions.

Suppose a column called order_date contains these values: 03/10/2026, 3 Oct 2026, 2026-10-03 and an empty cell. You ask an assistant for a formula that turns everything into proper dates.

It will probably offer a reasonable formula. Before you apply it to thousands of rows, ask yourself four questions, and ask the assistant to answer them too:

  1. Which convention is 03/10/2026? In some countries it means 3 October and in others 10 March. A formula that guesses one way will convert every ambiguous date without complaint. Check the source of the data, and look for a value like 25/10/2026 that can only be read one way.
  2. What happens to the blank? It might become zero, which a spreadsheet may display as a date in 1900 or 1970. A blank should stay blank or be flagged.
  3. What happens to values the formula cannot parse? Silent conversion to an error value, or to the wrong date, is the main risk.
  4. How will you know it worked? Count the rows before and after, count how many dates parsed, and look at the earliest and latest result. A date in the year 1900 or in 2062 is a sign of failure.

The reconciliation checks from earlier in this article apply directly. If you had 5,000 rows and 4,910 parsed, you know 90 need attention, which is far better than not knowing.

Prompt for the review step.

Code
Here is my date column pattern (examples: 03/10/2026, 3 Oct 2026, 2026-10-03, blank). The datacomes from [SOURCE], and I believe the convention is day/month/year. Write a formula orshort script that converts them to proper dates, leaves blanks blank, and flags any value itcannot parse instead of guessing. Then list what could still go wrong.

The instruction "flags any value it cannot parse instead of guessing" turns a hidden failure into a visible list, which is the pattern behind most reliable data work.

Common analysis traps (ask the AI to look for them)

#

These are good prompts for a review step: "List the ways this analysis could mislead, given my data."

Trap

What happens

Check

Averaging averages

Groups of different size get equal weight

Recompute from totals

Mixed units or currencies

Rupees and thousands of rupees added together

Check headings and scales

Blanks treated as zero

Averages shrink, counts inflate

Decide what blank means

Duplicates

Totals inflated

Count unique IDs

Percent of a percent

Wrong base

State "percent of what"

Outliers

One huge value distorts the mean

Look at median and a chart

Small samples

Noise looks like a trend

Check how many records

Correlation as cause

Two things move together, so "A causes B"

Ask for alternative explanations

Cherry-picked period

A trend appears only in a chosen window

Test other windows

Misleading charts

Truncated axes or scales exaggerate

Read the axes

Interpretation: hypotheses, not verdicts

#

AI is useful for suggesting possible explanations ("sales dropped in week 3, possibly due to a holiday, a stock-out or a pricing change") because it can draw on patterns from many situations. Those are hypotheses. You test them with your data and your knowledge of the business. When an assistant writes "sales fell because of the holiday", ask: "What evidence in this data supports that, and what else could explain it?" If the data cannot say, the sentence should say "may" or be removed.

Cleaning data with AI

#
  • Keep the original untouched and work on a copy.
  • Ask for a change log: "List every kind of change you are proposing, with an example, before applying anything."
  • Prefer formulas or scripts you can inspect to opaque "fix it" actions.
  • Check rows that changed: sample ten before and after.
  • Beware of over-cleaning, such as deleting "outliers" that were real, or standardising names in a way that merges different people.

Privacy: use less data

#

Data often contains personal or business-sensitive information, such as customer names, phone numbers, salaries or sales figures that your organisation treats as confidential.

  • For formulas and methods, sample rows with fake or anonymised values are enough.
  • Remove or mask identifiers (names, phone numbers, emails, ID numbers) when you do need to share real structure.
  • Use your organisation's approved tool for real data, and check its data terms.
  • Never paste credentials, API keys or database connection strings.

Privacy and Security goes through these in more detail.

Common mistakes

#
  • Asking the model to total a pasted table and trusting the answer.
  • Applying a formula to the full sheet without a small test.
  • Not reconciling after a cleanup.
  • Accepting the AI's explanation of a trend as if it were an analysis.
  • Sharing a whole sensitive spreadsheet when sample rows would do.
  • Presenting a chart without reading its axes.

Exercises

#

Exercise 1

Do the numbers add up?

#

Three stores: A had 4 orders averaging Rs 50, B had 6 orders averaging Rs 100, C had 10 orders averaging Rs 30. An assistant says the overall average is about Rs 60. Compute the correct overall average and check the claim.

Exercise 2: Test a formula

#

An assistant gives you =SUMIF(B:B,"North",D:D) for "total value for North" with columns A (id), B (region), C (date), D (value). Describe a three-row test you would run, and one problem that could make it wrong.

Exercise 3: Make it safe to share

#

You want help with a formula on a salary spreadsheet with columns employee_name, manager, salary, department. Describe what you would send instead of the real data.

Exercise 4: Challenge a conclusion

#

An assistant concludes: "Ice cream sales and sunburn cases are highly correlated, so ice cream causes sunburn." Explain what is wrong and rewrite the prompt so that the assistant looks for alternative explanations.

Show solutionHide solution

Total value: A = 4 x 50 = 200. B = 6 x 100 = 600. C = 10 x 30 = 300. Total = 1,100. Total orders = 4 + 6 + 10 = 20. True average = 1,100 / 20 = Rs 55.

The simple average of the three averages is (50 + 100 + 30) / 3 = 60, which is exactly the claimed "about 60". So the assistant used the average of averages, and the claim is wrong: the true figure is 55. The reconciliation check: 60 x 20 orders = 1,200, which does not equal 1,100.

Store C had the most orders but a low average, so it should pull the overall figure down more than the simple average allows.

Exercise 2

Show solutionHide solution

Test rows, which you total by hand:

Code
1, North, 01/10/2026, 1002, South, 01/10/2026, 2003, North, 02/10/2026, 50

The formula should return 150. Possible problems: (1) values stored as text, which SUMIF ignores in the sum range, so the result could be 0 or too low; (2) the region written as "North " with a trailing space or as "north" in some rows, which would not match exactly (SUMIF is case-insensitive in most spreadsheet programs, but not space-insensitive); (3) a header row or a total row inside the range that is double-counted. Check the total against a pivot table or a manual filter on real data.

Exercise 3

Show solutionHide solution

Send the structure and a few made-up rows, for example:

Code
Columns: employee_id (e.g. E001), manager (e.g. M01), salary (number), departmentSample rows: E001, M01, 500000, Sales / E002, M01, 650000, Sales

Use fake identifiers and invented values. Ask for the formula and test it yourself on the real sheet, offline or in your own spreadsheet. Salary data about named people is sensitive. If you need AI to analyse the real data, use only a tool your organisation has approved for that type of data, and anonymise it first.

Exercise 4

Show solutionHide solution

Both rise in hot weather, so a third factor (temperature, sunny days, summer season) probably drives both. That is a confounder. Correlation shows that two things move together, not that one causes the other.

A better prompt: "These two series are strongly correlated: [description]. List at least three alternative explanations other than A causing B, including possible confounders. For each, say what data would help test it. Do not state a cause as fact."

Where to go next

#
  • Guide · Technology

    Writing Better AI Prompts: A Practical Guide

  • Guide · Technology

    Using AI Tools at Work Without Getting Into Trouble

  • Course · Career

    Off-Campus Placements With AI: From Zero to Offer