# Spreadsheet Formula: Excel and Google Sheets

Spreadsheet Formula: Excel and Google Sheets is a tested SKILL.md that writes one spreadsheet formula for Excel or Google Sheets from a plain description and a sample of the sheet, using the sheet's real cell addresses and ready to be copied down; an agent buys it once for $0.01 over x402.

- Page: https://aiskills402.com/skills/spreadsheet-formula
- Category: Data & Analysis (https://aiskills402.com/categories/data)
- Price: $0.01 once, USD-priced, paid in USDC on Base over x402. Price as loaded on this page. The 402 response your agent receives is authoritative.
- Version: 1.0.0
- Card (JSON): https://api.aiskills402.com/v1/skills/spreadsheet-formula

## Use it when

Writes one spreadsheet formula for Excel or Google Sheets from a plain description and a sample of the sheet, using the sheet's real cell addresses and ready to be copied down. It fixes the ranges that must not move, looks values up by exact match, reads thresholds the way they are worded, builds dates with DATE, keeps blank cells apart from zeros, and uses functions that work in both Excel 2019 or later and Google Sheets. It answers with the formula alone. Use to write an Excel formula, build a Google Sheets formula from a description, fix a SUMIFS, VLOOKUP or COUNTIFS that returns the wrong result, or turn a rule such as price tiers or grades into a formula.

## Not for

Macros, Apps Script, pivot tables, charts or whole-workbook changes, and formulas that need data the sample does not show. It writes one formula for one cell; it does not open or edit your file, and it has no way to test the formula in your own copy of Excel.

## Tested, honestly

Tested 2026-10-08.

- Strong model (claude-sonnet-5-5 (Claude Code alias "sonnet")): Wrote a correct formula for all 21 tasks, each as the single line asked for, computed by a real spreadsheet engine on the sample and copied down where the task said so: sums and counts with boundaries, exact lookups in unsorted codes, a not-found text, tiers, a month filter that checks the year, an average where zero counts and blank does not, a running total, working days with holidays, a two-key lookup, semicolons and decimal commas for a Bulgarian sheet, a Missing line when the price column was absent, distinct customers with a blank cell, a latest date or none, days overdue against one fixed cell, a first name from a one-word name, and an either-or count. It ignored a cell telling it to answer =0.
- Weak model (claude-haiku-5-5 (Claude Code alias "haiku")): Also 21 of 21, with the same kinds of formula as Sonnet.

Note: Twenty-one tasks written by us, each a description plus a sample sheet; the answer is evaluated by HyperFormula 3.4 on that sheet and every target cell is compared with the expected value. The first fourteen tasks turned out easy: in a first run both models solved them with and without the skill, so seven harder ones were added and everything was run again. The skill itself was changed twice after its own failures on these tasks: it did not say that decimals are written with a comma where semicolons separate the arguments, and its own code formatting led the models to wrap the formula in backticks. The result shown is the fourth run with the skill on the same tasks, while the side without the skill was run once, so treat the difference as small. One run per model and task in each version; earlier runs are kept in the test folder. Two gaps of the engine were fixed in our checker, not in the skill: bare TRUE and FALSE, and array arithmetic for SUMPRODUCT.

### With and without the skill

Tested 2026-10-08.

- Correct formula, one line (21 tasks): Sonnet 21/21 with, 19/21 without; Haiku 21/21 with, 21/21 without.

The same request and the same check on both sides. Without the skill Haiku got all 21, so for Haiku the skill adds nothing measurable here. Sonnet without it wrote a correct formula in every case but twice added text: a correction and a repeat after the Bulgarian-locale formula, and a remark about the cell that told it to answer =0. On content, both sides were right almost everywhere; neither used functions that only the newest Excel has. The gain is the strict one-line answer, and it rests on few cases.

Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.

Full summary: https://aiskills402.com/skills/spreadsheet-formula/tests

## Example

### English (claude-sonnet-5-5)

Before:

> F2 should show the total Amount for the region named in E2. The same formula will be copied down to F4. |   | A | B | C | D | E | F | |---|---|---|---|---|---|---| | 1 | Region | Product | Amount |  | Region | Total | | 2 | South | Chair | 80 |  | North |  | | 3 | North | Desk | 120 |  | South |  | | 4 | North | Lamp | 45 |  | West |  | | 5 | East | Desk | 200 |  |  |  |…

After:

> =SUMIFS($C$2:$C$7,$A$2:$A$7,E2)

## What is in the file

- The answer
- Rules
- Work in this order
- Short examples

## Languages

Any language

## How to buy

Agent (HTTP):

1. GET https://api.aiskills402.com/v1/skills/spreadsheet-formula/file without a payment header. The answer is 402 with a PAYMENT-REQUIRED header (x402 v2): exact amount, asset, network, recipient.
2. Sign `accepts[0]` with an x402 client (for example @x402/core + @x402/evm).
3. Repeat the GET with the signature in the PAYMENT-SIGNATURE header. The answer is 200 with the file, its sha256 and a re-download token.

Agent (MCP): https://mcp.aiskills402.com/mcp — free tools search_skills, get_skill, redownload_skill. Buying itself is over HTTP.

Full flow: https://aiskills402.com/docs

## The file

- Version: 1.0.0
- Size: 6.2 KB (6311 bytes)
- SHA-256: 269446be2268e3e514ef867d4f183948d15935a5c4603a3d5d75342b60a990bd
- Updated: 2026-10-08
- New versions are free through your re-download token.

## Versions

### 1.0.0 (2026-10-08)

First release: writes one Excel or Google Sheets formula from a description and a sample of the sheet, using the real cell addresses and ready to be copied down. It keeps shared ranges absolute, looks values up by exact match, reads thresholds as worded, builds dates with DATE and filters months by year too, keeps blank cells apart from zeros, sticks to functions that work in Excel 2019 or later and in Google Sheets, and answers with the formula alone, or a Missing line when the sheet lacks what the formula needs.

## License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Terms: https://aiskills402.com/docs#license

## FAQ

### Does my model need this to write formulas?

Probably not for the formula itself. In our test of 21 tasks, Claude Haiku wrote a correct formula for every one without the skill, and Claude Sonnet did too, but added text around two of them. What the skill gives is a strict answer: one line you can paste, absolute ranges for copying down, and functions that also exist in Excel 2019.

### How were the formulas checked?

Each formula was evaluated by a real spreadsheet engine on the sample sheet from the task, copied down where the task said so, and every cell was compared with the expected value. A control made sure that the typical wrong formula fails, such as a lookup without exact match or a boundary on the wrong side.

### Does it handle a decimal comma?

Yes. If your numbers are written as 12,5, as in a Bulgarian or German sheet, it writes semicolons between the arguments and a comma in decimals, which is what such a sheet expects. Our first version missed the second half of that rule; it was fixed and tested again.

### Why is it so cheap?

Because our own test could not show that it makes the formulas more correct, only that the answer comes back as one clean line more reliably. We price skills without a measured gain in quality at one cent and say so.

## Related skills

- [Text to JSON: Extract Data Without Guessing](https://aiskills402.com/skills/text-to-json.md): $0.05 once
- [SQL Query Optimizer for D1, SQLite and Turso](https://aiskills402.com/skills/sql-query-optimizer.md): $0.05 once
- [Tests from Spec: Cases from the Requirements](https://aiskills402.com/skills/tests-from-spec.md): $0.03 once

## Measurement limits

- Models other than the two named above were not run.
- Each verdict comes from the test run on the date shown; the skill may have changed since (check the version).
- Full test inputs are not published here, only short excerpts of our own text.
- Results on your own texts, languages and domains can differ.

Offer note: Paid in USDC (USD-pegged) over x402 by an AI agent; one-time.
