Data AnalyticsGenerative AI for verified analyst work

Know when a spreadsheet formula is better than an AI agent

PK
Pankit Kumar
Sr. Data Scientist at Parexel (a Goldman Sachs–backed company) · 20 September 2026 · 3 min read
Technically reviewed by Ishaan Sharma
In this article (6 sections)

A spreadsheet formula is often the better fit when the input table is manageable, the calculation rule is fixed and the user needs a transparent result inside an existing workbook. An AI agent becomes relevant when the workflow genuinely requires interpreting varied requests or choosing among steps, and those choices can be evaluated and bounded.

Choose the mechanism from the task. Adding autonomous decisions to a fixed conditional sum creates additional behavior to verify without necessarily improving the answer.

Identify the deterministic core

The original synthetic task asks for January completed-order amount. Eligibility is explicit: completed status, local timestamps from January 1 inclusive to February 1 exclusive, one supplied amount per order, including unmatched customers.

There is no need for a model to decide which aggregation function to invent on every run. The rule can be expressed in a spreadsheet, SQL or Python and checked against eight eligible orders totaling 104,000 paise.

The choice among those implementations depends on input size, refresh process, collaboration and operating requirements. A spreadsheet is not automatically the right production system merely because its formula is short.

Express the rule in a workbook

If the data is loaded into an Excel table named Orders, amounts are numeric, and ordered_at contains real Excel date-time values rather than unparsed text, the teaching formula is:

text
=SUMIFS(Orders[order_total_paise],
        Orders[status],"completed",
        Orders[ordered_at],">="&DATE(2026,1,1),
        Orders[ordered_at],"<"&DATE(2026,2,1))

Microsoft's SUMIFS documentation describes conditional summation with multiple criteria. The formula above is a proposed workbook implementation; it was not executed in Excel during this lab. The corresponding reference calculation below was executed in Python.

Verify the import types and unique order IDs first. A correct formula over duplicated source rows still double-counts. Divide the paise result by 100 only when presenting rupees, and label the displayed unit.

Check the result independently

python
from decimal import Decimal
from calculator import calculate
from readonly_sql import query

reference = calculate()
sql = query('SELECT COUNT(*),SUM(order_total_paise) FROM orders '
            'WHERE status=? AND ordered_at>=? AND ordered_at<?',
            ('completed','2026-01-01T00:00:00','2026-02-01T00:00:00'))
assert sql['rows']==[[8,104000]]
assert reference['value']==sql['rows'][0][1]
rupees = Decimal(reference['value'])/100
assert rupees==Decimal('1040')
print({'eligible_orders':8,'amount_paise':104000,
       'display_rupees':format(rupees,'.2f'),'excel_runtime_checked':False})

Agreement between two implementations is useful evidence for this fixture. It does not prove that both interpreted an ambiguous business request correctly, so retain the written contract and hand-audited eligible IDs.

Choose the surrounding workflow deliberately

NeedSuitable starting point
One transparent conditional sum in a controlled workbookFormula with input validation and reconciliation
Recurring file ingestion, deduplication and repeatable outputsScripted pipeline with checks and run evidence
Questions phrased differently by usersAssistant that clarifies intent and calls bounded deterministic tools
Unsupported business explanation or missing evidenceClarification or investigation, not autonomous invention

Anthropic's workflow and agent guidance discusses choosing appropriate system complexity. In this teaching case, calculation stays deterministic even if an assistant helps explain the result.

Evaluate maintenance, not just the demo

Ask who updates the period, checks schema changes, investigates failures and reviews the output. A workbook with hidden manual steps can be fragile; an agent with undocumented tool choices can be fragile too. The comparison should include the actual handover and failure process.

No cost or speed advantage is measured here. The decision rests on the task's fixed rule and inspectable implementation, not an invented productivity benchmark.

Exercise: describe one change that would justify moving this workbook calculation into a scheduled script, and one additional requirement that would justify adding an assistant interface. Keep the metric calculation unchanged across both transitions.

NeuraPath's Data Analytics with Generative AI course combines spreadsheet, SQL, Python and AI skills so learners can choose a suitable implementation instead of forcing every problem into the newest tool.

Continue learning

This article is part of the Generative AI for verified analyst work sequence. Use the neighbouring tasks when you need the prerequisite or the next application.

PK
Pankit Kumar
Lead Instructor, NeuraPath Academy

Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.

This article is part of our Data Analytics with Generative AI programme — 3–4 months. The full analyst stack — Excel, SQL, Power BI and Python pipelines — then a generative-AI layer you can prove is right.

Explore Data Analytics with Generative AI
Counselling is free · no obligation

Not sure which programme fits?

Tell us your background and we will map it to the right entry point — including saying so when a cheaper programme is the better fit. A counsellor replies within one working day.