Quick answer
Tell the AI which spreadsheet app you use, show a small sample with cell addresses, and ask for one formula plus a plain-English explanation. Put it in a practice sheet and compare the result with a total you calculated separately.
This walkthrough adds amounts for rows marked Paid. You will also check another status and a status with no matching rows. You need a spreadsheet app you already use and a chat tool you are allowed to use; no workbook upload or AI-to-spreadsheet connection is needed.
The example uses English function names and comma separators. If your settings differ, tell the assistant before copying its formula. Keep the original workbook unchanged while you practice.
1. Define the result before asking for a formula
Write one sentence describing the calculation: “Add the Amount values only where Status is Paid.” That specifies an operation, a column to check, and a condition.
“Analyze this sheet” leaves too much open. The assistant might summarize the data instead of writing a reusable calculation. Our spreadsheet summary guide covers that different task.
For your own sheet, write down:
- The app you use and the cell where the answer should go.
- The header row and exact range containing data.
- Which rows qualify and which numbers should be added.
- Whether the formula will be copied into other cells.
Use fictional values with the same layout if the real file contains private information. A formula question usually does not need customer names, bank details or the full workbook.
2. Make a small practice sheet
Open a new, separate sheet. Enter this fictional sample in A1:B5; the first row contains the headers. On a phone, swipe tables sideways to see all columns.
| Row | A: Status | B: Amount |
|---|---|---|
| 1 | Status | Amount |
| 2 | Paid | 120 |
| 3 | Pending | 80 |
| 4 | Paid | 45 |
| 5 | Cancelled | 30 |
Enter only the Status and Amount columns into the sheet; the Row column above shows their addresses. Use plain numbers in column B. These practice amounts have no tax or currency meaning.
Put Status in D1 and Total in E1. Enter Paid in D2. Leave E2 empty for the formula.
Before asking the AI, find the expected result yourself: the Paid rows contain 120 and 45, so their total is 165. Keep that reference beside the sheet. An explanation from the same assistant is not an independent check.
3. Ask for one formula and its explanation
Use a request like this, replacing the app name if necessary:
I use Google Sheets with English function names and comma separators.
Help me write one formula. Do not edit or upload any file.
A1 is Status; B1 is Amount.
A2: Paid B2: 120
A3: Pending B3: 80
A4: Paid B4: 45
A5: Cancelled B5: 30
D1 is Status; E1 is Total; D2 contains Paid.
The formula goes in E2.
Add the amounts whose Status matches D2.
Keep the data ranges fixed when I copy the formula down;
let the criterion move from D2 to D3, D4 and so on.
Return:
1. The formula only, in a code block.
2. A short explanation of each argument and each dollar sign.
3. Which rows should count for Paid, and the expected result.
Do not add rows or assume data outside A2:B5.
The range and output cell matter. Without them, an otherwise reasonable formula can read the wrong column or shift to different rows when copied.
For a smaller question, you can shorten this request. Preserve the details that decide the calculation rather than adding a long description of your business.
4. Read the formula before running it
Here is a prepared example answer, not a transcript of a live chatbot or spreadsheet test:
Formula for E2:
=SUMIF($A$2:$A$5,D2,$B$2:$B$5)
Check A2:A5 for the status in D2.
Add the corresponding amounts in B2:B5.
The dollar signs keep both data ranges fixed when copied.
D2 is relative, so copying the formula down uses D3 next.
For Paid, count rows 2 and 4: 120 + 45 = 165.
Google documents SUMIF as a conditional sum. Its arguments identify the cells to check, the condition, and the cells to add. Microsoft’s SUMIF reference describes the corresponding Excel function.
Match every part to your sheet. The first range contains statuses; the last contains amounts. Both cover rows 2 through 5. The header is excluded, and D2 supplies the status being requested.
Microsoft’s cell-reference guide explains why absolute references stay fixed when copied. The dollar signs anchor addresses; they do not protect the workbook from editing.
If an argument is unexplained, ask the assistant to explain that part before proceeding. Do not accept a confident description that names cells absent from your sample.
5. Test the result and a copied version
Paste only the formula, starting with the equals sign, into E2. Do not include the surrounding code-block markers or the words “Formula for E2.”
For the supplied sample, the expected result is 165. Compare it with your separate addition, then inspect the formula bar to confirm the actual ranges.
Next, enter Pending, Cancelled and Refunded in D3:D5. Copy E2 into E3:E5, using your app’s normal copy-and-paste or fill command. Check the copied formulas as well as the results.
| Criterion | Supporting amounts | Expected total |
|---|---|---|
| Paid | 120 and 45 | 165 |
| Pending | 80 | 80 |
| Cancelled | 30 | 30 |
| Refunded | No matching rows | 0 |
In E3, the condition should refer to D3 while the two data ranges remain unchanged. A formula that still uses D2 in every result cell would keep asking about Paid.
Here, zero for Refunded means the sample has no matching rows. It does not prove that missing amounts in another dataset represent zero, or that an actual refund has been processed.
Change one input, then restore it
After the baseline matches, make a controlled change in the practice sheet. Change B2 from 120 to 121. Because that row is Paid, the expected Paid total becomes 166. Put B2 back to 120 and check that the result returns to 165.
Now change B3 from 80 to 81. That row is Pending: the Paid total should stay 165, while the Pending total should become 81. Restore B3 to 80 before continuing.
These checks help you see whether the formula follows the intended rows and whether the copied version uses its own criterion. Record the input change and expected effect before editing; changing several cells together makes a mismatch harder to explain.
A matching result still does not verify every possible input. Keep the tests tied to this sample and repeat relevant checks when you change the real ranges or business rules.
6. Correct one problem at a time
If the result is wrong, report the actual formula, result and error message. Do not give the assistant unrestricted access to the workbook.
A focused follow-up might be:
The formula in E3 still refers to D2.
I want E3 to use the status in D3, while keeping A2:A5 and B2:B5 fixed.
Correct only that reference and explain the change.
Do not change the sample data.
If the formula will not parse, compare the app, function language and separators with your request. Google’s spreadsheet settings guide explains locale and function-language settings. Avoid changing a shared workbook’s settings just to make a tutorial example paste.
If the result is unexpectedly zero, inspect the status label, criterion cell and amount cells. Check what is actually stored rather than relying on how a cell looks.
If the assistant proposes a script, macro or add-on, ask why a normal formula is insufficient. This practice task needs no script, account connection or permission to send data elsewhere.
7. Move the checked logic into your real sheet
Write down how the practice columns map to the real ones. Replace the ranges deliberately, then verify representative rows again. Do not assume that a formula validated on four rows covers additional data below them.
A new requirement changes the task. For example, matching both Status and a date condition needs a different brief; do not quietly add that rule to a single-condition example.
Keep a copy of the original and compare the result with a calculation based on the actual source rows. Your formula is ready when you understand its references and can explain why the checked rows belong in the total.
Sources and limits
Official function, reference and settings documentation linked above was checked November 17, 2026.
The dataset, prompt and sample answer were prepared for this article. Expected totals were checked by direct addition and a separate reference calculation. We did not run a live Google Sheets, Excel or chatbot session for this example; the table gives expected results for you to verify in your app, not observed software results.
Questions & answers
Do I need to upload my spreadsheet?
No. For this exercise, paste the column names and four fictional rows into the chat. Keep confidential data out, and test the formula in a separate practice sheet.
Does a formula that returns a number count as correct?
No. Check which cells it reads, which condition it applies, and whether the result matches an independent calculation. Test another condition and a condition with no matching rows.