Topic 1 of 5 · 4 min read
Writing formulas by describing the calculation
Goal: Turn a plain-language calculation into a working formula and test it on three rows whose answers you already know.
Describe the calculation in words, with the column names and the edge cases, then test the formula the assistant gives you on rows whose answers you already know.
Check yourself · 1 of 3
You ask Copilot for a formula and get one back. What is the safest next step before you use it on 2,000 rows?
Why it matters
Many people know what they want from a sheet but not the formula syntax. Copilot in Excel and Gemini in Sheets can write the formula for you. That saves time. But the formula looks the same whether it is right or wrong. A wrong formula does not show an error. It shows a number, and people trust numbers.
How to do it
- Name the columns. Say "column C holds the order date, column F holds the amount". The assistant cannot guess which column you mean.
- State the result you want. One cell, one value per row, or a whole table? Say where the answer should go.
- Give the edge cases. What should happen when a cell is blank, when a customer has no orders, or when two rows tie? If you do not say, the assistant picks a behaviour for you.
- Ask for a short explanation. "Explain the formula in one sentence per part" lets you check that it does what you asked.
- Test on three rows. Pick one normal row, one blank or odd row, and one row at the edge of a rule. Work out the answers by hand first, then compare.
Before and after
Before: Give me a formula for the bonus.
The assistant must guess the columns, the rule and the blanks.
After: In column G, for each row, calculate a bonus. If the sales in column D are 50,000 or more, the bonus is 5 percent of D. Otherwise it is 2 percent. If D is blank, leave G blank. Explain each part of the formula.
Now check three rows. A row with sales of 60,000 should give 3,000. A row with 50,000 should give 2,500, because the rule says "or more". A blank row should stay blank. If the 50,000 row gives 1,000, the assistant used "more than" and not "or more".
What goes wrong
- The formula answers a slightly different question. It sums by month when you needed by week, and the total still looks sensible.
- Edge cases are silently decided. A blank cell is treated as zero, so a missing value looks like a real zero.
- The function does not exist in your version. Some tools write functions your Excel or Sheets version lacks, and you get a name error. Check the name in the official function list.
Keep the formula and your three test rows on the sheet. When the data changes next month, run the same checks again.
Examples
A bonus rule with a blank and a boundary
Request: In column G, if the sales in column D are 50,000 or more, the bonus is 5 percent of D, otherwise 2 percent. If D is blank, leave G blank.
Test rows worked out by hand:
| Row | Sales in D | Expected bonus in G |
|---|---|---|
| 2 | 60,000 | 3,000 |
| 3 | 50,000 | 2,500 |
| 4 | (blank) | (blank) |
If row 3 shows 1,000, the formula treats the boundary as 'more than 50,000'. Ask the assistant to fix it and test again.
Naming what happens with no match
Weak: Look up the price for each product.
Better: For each product code in column A, find the price in the Prices sheet (codes in column A, prices in column B). If a code is not found, show the text 'No price' and do not show an error.
Key points
- Name the columns, the result and the edge cases in the request; the assistant cannot see what is in your head.
- A wrong formula returns a plausible number, not an error, so it needs a test.
- Ask the assistant to explain each part of the formula, then check the parts against your rule.
- Test on three rows with answers you worked out by hand: a normal row, an odd row and an edge row.
- Rules such as 'or more' versus 'more than' are where AI-written formulas most often drift.
Common mistakes
- Asking for 'a formula for the bonus' without naming columns, rules or blanks.
- Pasting the formula into the whole column before testing a single row.
- Trusting the explanation text without comparing it with the rule you gave.
- Accepting a formula that uses a function name you cannot find in the official function list.
Check yourself · 2 of 3
Which request gives an assistant the most useful information for writing a formula?
Check yourself · 3 of 3
Sales of exactly 50,000 should earn the higher bonus under your rule 'at least 50,000'. The formula gives the lower bonus on that row. What is the likely cause?
Practice items, not counted towards your mastery.
Start here
- Get started with Copilot in Excel (opens in a new tab)DocsFree
Microsoft's entry page for the Copilot pane: what it can do with formulas, tables and analysis.
- COPILOT function (Excel) (opens in a new tab)DocsFree
Microsoft's page on the in-cell COPILOT function, including its removal on 14 September 2026 and what happens to old results.
- Gemini in Google Sheets (opens in a new tab)ArticleFree
Google's overview of Gemini features in Sheets, the other main assistant this skill covers.
More for this topic
- Excel functions by category (opens in a new tab)DocsFree
A browsable list of real Excel functions, so you can check that a function an assistant used actually exists.