Library › Coding AI › Nonprofit staff

Assign donor tiers from this fiscal year's gifts

Practice: Giving the right context. About 5 minutes.

About this exercise

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.

Common mistakes when you ask AI for this

  • Not saying which gifts count. The AI sums everything, so pledges get counted twice and in-kind inflates totals. Try: Add: "Only type Gift, dated between $H$1 and $H$2."
  • Leaving the tiers open. The AI invents its own tier names and cutoffs. Try: List them: "1,000+ Leader, 250+ Partner, above 0 Friend."
  • Forgetting zero totals. Donors with no gifts this year get labeled Friend or show 0. Try: Add: "A total of 0 stays blank."
  • Getting a menu of options. The AI likes to offer two or three versions of the formula, so you're left to pick and test them yourself. Try: Add: "Give one formula only, in one code block, no alternatives."
  • Getting a tutorial. By default the AI explains every part of the code at length, which you then have to scroll past. Try: Add: "After the code, one line under 10 words. Nothing else."

What a strong prompt includes

  • Says which gifts count
  • Uses the fiscal year cells
  • Lists the tiers
  • Asks for one answer only
  • Limits the explanation

Practice this now ↑

Related exercises