AI wrote your Excel formula. Check these four rows first.
A plausible formula can add the wrong rows. Use a tiny example with a known answer before applying it to a full workbook.
Give the AI the column roles, the exact condition and the expected answer for a small example. Then compare its formula with that answer. A formula that runs without an error has passed only the first check.
Try a four-row example
This is an invented test: A1 is Status and B1 is Amount. Rows 2–5 contain paid/120, unpaid/80, paid/30 and paid/-20. The amount cells are numbers. Only the three paid rows qualify, so the expected total is 120 + 30 − 20 = 130.
Match the condition range to the sum range
For that example, =SUMIF(A2:A5,"paid",B2:B5) tests the status cells and adds the corresponding amounts. Microsoft documents SUMIF(range, criteria, [sum_range]); text criteria use quotation marks. Both ranges here start on row 2 and end on row 5.
Change one thing and predict the result
Change A3 from unpaid to paid: the expected total becomes 210. Change B5 from -20 to 0: with A3 still paid, it becomes 230. Restore the original cells: it returns to 130. These separate expectations help expose an omitted final row or an ignored refund.
Check the real workbook before replacing anything
Use a copy. Inspect whether amounts are numbers, whether new rows fall outside the formula and whether several conditions are needed. SUMIF handles one condition; Microsoft points to SUMIFS for multiple conditions. Ask the AI to explain each range, then check it against your sheet.
Published October 13, 2026. Example arithmetic was independently checked. We did not run Excel or Copilot; no model accuracy or workbook compatibility result is claimed.
Sources: Microsoft · SUMIF.