Library › Data AI › Finance and accounting
Write a SUMIFS formula for region sales in a month
- For Finance and accounting
- You practice Setting limits and rules
- Time about 5 minutes
- Level Intermediate
About this exercise
Finance wants a single cell that totals West region sales for the month typed in cell F1. Ask for one Excel formula in a single code block, then exactly 2 numbered lines labeled Counts: and Skips:, under 40 words outside the code. The date column holds real dates, and the formula must still work when more rows are added below. Round the result to whole dollars because the director reads it on a dashboard.
Common mistakes when you ask AI for this
- Filtering by month name. The AI uses TEXT() or MONTH() tricks that miss the year or break. Try: Add: ">= F1 and < EDATE(F1,1) on the date column."
- Counting refunds. Nothing in the formula stops refunded orders from being summed. Try: Add: "Status must equal Paid."
- Fixed small ranges. The AI limits ranges to A2:A6 and it breaks as rows are added. Try: Add: "Whole-column ranges so new rows are included."
- Leaving the format to chance. The AI picks its own length and layout unless told the exact shape. Try: Add: "Put the code in exactly 1 code block. Exactly 2 numbered lines. Keep the writing outside the code under 40 words."
What a strong prompt includes
- Names SUMIFS
- Gives the date boundaries
- Adds the Paid condition
- Wants growing ranges
- Fixes the shape
Related exercises
- Accept the buyer's counteroffer on three stated conditions (Sales AI · Sales and customer success)
- Accrue goods received but not invoiced at PO price (Finance AI · Accountants)
- Acknowledge a cancellation request without a save attempt (Customer Support & Success AI · Customer success managers)
- Acknowledge an accessibility bug without a promised date (Customer Support & Success AI · Customer support teams)
- Add dark mode by overriding your existing CSS variables (Coding AI · Software developers)