{"id":"code-work-np-donor-tier-sumifs","audience":"nonprofit","category":"coding","track":"coding","technique":"context","title":"Assign donor tiers from this fiscal year's gifts","free":false,"task":"Write one Excel formula for Donors!C2 (filled down) that gives each donor's tier from their gifts this fiscal year. Sum the Gifts tab amounts (column C) where the donor ID (A) matches Donors!A2, the date (B) is between $H$1 and $H$2, and the type (D) is Gift, since pledges and in-kind don't count. Tiers: 1,000 or more is Leader, 250 to 999.99 is Partner, more than 0 is Friend, and 0 stays blank. One formula in one code block, then under 25 words outside the code.","materialLabel":"Gifts tab preview (attached to your prompt automatically)","material":"GIFTS tab - Riverbend Food Share (row 1 is headers, about 2,300 rows)\nA Donor ID | B Date | C Amount | D Type | E Campaign\nD-1042 | 07/15/2026 | 500 | Gift | Summer Meals\nD-1042 | 09/02/2026 | 600 | Pledge | Fall Drive\nD-1042 | 10/11/2026 | 250 | Gift | Fall Drive\nD-2210 | 06/20/2026 | 1,200 | Gift | Spring Gala\nD-2210 | 08/05/2026 | 100 | In-kind | Pantry goods\nD-3307 | 10/30/2026 | 40 | Gift | Online\n\nDonors tab: A Donor ID | B Name | C Tier\nH1: 07/01/2026 (fiscal year start)\nH2: 06/30/2027 (fiscal year end)\n\nNotes from Grace (development):\n- Tiers decide who gets the year-end impact report in print.\n- Pledges are recorded when promised and again as a Gift when paid.\n- In-kind gifts are valued by the pantry team.","rules":[{"type":"codeBlocks","count":1},{"type":"maxProseWords","max":25}],"mistakes":[{"title":"Not saying which gifts count","why":"The AI sums everything, so pledges get counted twice and in-kind inflates totals.","fix":"Add: \"Only type Gift, dated between $H$1 and $H$2.\"","checks":["r0"]},{"title":"Leaving the tiers open","why":"The AI invents its own tier names and cutoffs.","fix":"List them: \"1,000+ Leader, 250+ Partner, above 0 Friend.\"","checks":["r1"]},{"title":"Forgetting zero totals","why":"Donors with no gifts this year get labeled Friend or show 0.","fix":"Add: \"A total of 0 stays blank.\"","checks":["r2"]},{"title":"Getting a menu of options","why":"The AI likes to offer two or three versions of the formula, so you're left to pick and test them yourself.","fix":"Add: \"Give one formula only, in one code block, no alternatives.\"","checks":["codeBlocks"]},{"title":"Getting a tutorial","why":"By default the AI explains every part of the code at length, which you then have to scroll past.","fix":"Add: \"After the code, one line under 10 words. Nothing else.\"","checks":["maxProseWords"]}],"promptHints":[{"label":"Says which gifts count","patterns":["pledge","in-kind","type","only gift"]},{"label":"Uses the fiscal year cells","patterns":["h1","h2","fiscal"]},{"label":"Lists the tiers","patterns":["leader","partner","friend"]},{"label":"Asks for one answer only","patterns":["\\b(one|single|1)\\s+(formula|code block|block|version)","only one","no (alternatives|options|other versions)"]},{"label":"Limits the explanation","patterns":["\\d+\\s*words","no (explanation|notes|commentary)","one (short )?(line|sentence)","nothing else"]}],"hint":"Look at the Type column: not every row is money in the door. Tell the AI which rows count, the date range cells and the exact tiers.","rubricLabels":["Uses SUMIFS on Gifts!C with Gifts!A matched to A2, Gifts!B >= $H$1 and <= $H$2, and Gifts!D = \"Gift\"","Assigns Leader at 1,000 or more, Partner at 250 or more, Friend above 0, in that order, with those exact labels","Returns a blank (\"\") when the total is 0"]}