Library › Data AI › Finance and accounting

Get a budget variance formula with the sign you want

  • For Finance and accounting
  • You practice Giving the right context
  • Time about 5 minutes

About this exercise

Your department heads read the variance column as "positive means we're under budget", and rows with a $0 budget must show a blank, not #DIV/0!. Ask for one formula for D2 (variance as a percent of budget) in one code block, then exactly 2 numbered lines labeled Positive means: and Blank when:, in plain words. Under 45 words outside the code.

Common mistakes when you ask AI for this

  • Not giving the sign rule. The AI picks (actual - budget) / budget, the same formula that confused your directors. Try: Add: "Positive must mean under budget."
  • Forgetting zero budgets. The AI's formula throws #DIV/0! on the Conferences row. Try: Add: "Show a blank when the budget is 0."
  • 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. The AI explains every part of the formula instead of the two things readers need to know. Try: Add: "Then 2 numbered lines, Positive means: and Blank when:, under 15 words each."

What a strong prompt includes

  • Says what positive means
  • Handles zero budgets
  • Asks for one formula
  • Names the 2 lines

Practice this now ↑

Related exercises