Lesson 2 of 8 · AI for Excel: Beginner to Confident
Your First AI-Written Formula (and How to Check It)
Get a working SUMIFS formula from AI, put it in Excel, and use three quick checks to make sure the answer is actually right.
In this lesson you will ask the AI for a real formula, put it into Excel, and then check it. The checking part is the most important skill in this course: a formula that runs without an error can still give the wrong number.
The task
We will use the sales sheet from lesson 1:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Date | Customer | Product | Qty | Amount |
| 2 | 02-10-2026 | Sharma Traders | Steel Bottle | 12 | 3480 |
| 3 | 02-10-2026 | Patel Electricals | Desk Lamp | 4 | 2600 |
Goal: in a summary area, show the total Amount per customer for one month.
Step 1: Ask clearly
Excel for Microsoft 365. Sheet "Sales": A = Date (real Excel dates),
B = Customer, E = Amount, data in rows 2 to 800.
In another area I have a customer name in G2, and the first day of the
month in H1 (for example 01-10-2026).
Write a formula for H2 that totals Amount for the customer in G2 for the
month in H1. Use whole-row ranges that will not break when I add rows.
Explain each part in one line.
A typical answer looks like this:
=SUMIFS($E:$E, $B:$B, $G2, $A:$A, ">="&H$1, $A:$A, "<="&EOMONTH(H$1, 0))
SUMIFSadds up column E where all conditions are true.$B:$B, $G2keeps only rows for the customer in G2.">="&H$1and"<="&EOMONTH(H$1,0)keep dates from the first to the last day of that month.- The
$signs keep ranges fixed when you copy the formula down.
Step 2: Put it in Excel
Paste the formula into H2, type a customer name in G2 and a date in H1. Then copy H2 down for more customers in G3, G4 and so on.
If you see an error instead of a number, copy the error and the formula back into the chat:
I get #VALUE! with this formula in H2: [paste formula]. What is wrong?
Step 3: Check it, three ways
Check 1: Filter and look. Turn on a filter on the data (Data → Filter), filter Customer to one name and Date to that month. Select the Amount cells: the Sum in the status bar at the bottom of Excel should match your formula.
Check 2: Test the edges. Add a test row dated the last day of the month and one dated the first day of the next month. The first should be counted, the second should not. Delete the test rows afterwards.
Check 3: Ask why, not just what. If anything looks off, ask:
My formula returns 45,200 but the filtered total is 47,800. What could
cause the difference? List the most likely reasons for my data.
Common causes: dates stored as text, extra spaces in names, or rows outside the range.
Make the formula your own
Ask the AI to adjust instead of starting over:
- "Change it to count orders instead of adding Amount." (COUNTIFS)
- "Also filter by Product in I1."
- "Show 0 instead of a blank when there are no sales."
Practice task
Using your own sheet from lesson 1, ask the AI for one SUMIFS or COUNTIFS formula. Put it into Excel and do all three checks. Write down any difference you found and how you fixed it.
Key takeaways
- Give the AI the exact cells for inputs (like G2 and H1) and the result cell.
- Ask it to explain each part, so you understand what you are pasting.
- Check with a filter and the status bar Sum, then test the edge dates.
- When numbers differ, ask the AI for likely causes in your data.
Finished this lesson?Mark it complete to track your progress on this device.