{"id":"sheet-fin-budget-variance-percent-formula","audience":"finance","category":"spreadsheets","track":"data","technique":"context","title":"Get a budget variance formula with the sign you want","free":false,"task":"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.","materialLabel":"Your budget sheet (attached to your prompt automatically)","material":"Sheet: Q4 Budget vs Actual (Excel)\n\nA Line item | B Budget | C Actual | D Variance %\nTravel | 12,000 | 9,600 |\nSoftware | 8,000 | 8,800 |\nTraining | 5,000 | 5,000 |\nConferences | 0 | 1,250 |\nOffice supplies | 2,500 | 2,000 |\nContractors | 30,000 | 33,000 |\n\nNotes:\n- D is formatted as a percent with 1 decimal\n- About 40 line items in total, rows 2-41\n- Last quarter the sheet used =(C2-B2)/B2 and two directors read overspending as good news\n- Conferences had no budget this year; the 1,250 was approved separately","rules":[{"type":"codeBlocks","count":1},{"type":"numberedItems","count":2},{"type":"maxProseWords","max":45}],"mistakes":[{"title":"Not giving the sign rule","why":"The AI picks (actual - budget) / budget, the same formula that confused your directors.","fix":"Add: \"Positive must mean under budget.\"","checks":["r0"]},{"title":"Forgetting zero budgets","why":"The AI's formula throws #DIV/0! on the Conferences row.","fix":"Add: \"Show a blank when the budget is 0.\"","checks":["r1"]},{"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":"The AI explains every part of the formula instead of the two things readers need to know.","fix":"Add: \"Then 2 numbered lines, Positive means: and Blank when:, under 15 words each.\"","checks":["r2","numberedItems","maxProseWords"]}],"promptHints":[{"label":"Says what positive means","patterns":["positive","under budget","b2\\s*-\\s*c2"]},{"label":"Handles zero budgets","patterns":["zero|\\b0\\b","blank","div/0"]},{"label":"Asks for one formula","patterns":["one formula","one code block","single formula","no alternatives"]},{"label":"Names the 2 lines","patterns":["positive means","blank when"]}],"hint":"Variance formulas can point either way. Say which way your readers expect and what to show when there's no budget.","rubricLabels":["The formula computes (budget minus actual) divided by budget, i.e. (B2-C2)/B2, so Travel shows +20% and Software shows -10%","The formula returns a blank (\"\") when B2 is 0, for example =IF(B2=0,\"\",(B2-C2)/B2), so Conferences shows no #DIV/0! error","After the code there are 2 numbered lines labeled Positive means: (spent less than budget) and Blank when: (the budget is $0), with no function names"]}