{"id":"data2-formula-commission-tiers-nested-if","audience":"finance","category":"spreadsheets","track":"data","technique":"constraints","level":"intermediate","title":"Write a nested IF for tiered commission","free":false,"task":"Sales ops needs commission percent in column C from the deal amount in column B. Ask for one Excel formula for C2 in a single code block, then one line starting 'Tiers:' repeating the three tiers in under 20 words. Your Excel is 2016, so IFS isn't available, and a blank amount must give 0.","materialLabel":"Commission policy and sheet (attached to your prompt automatically)","material":"Sheet: Deals (Excel 2016)\n\nA Rep | B Deal amount | C Commission %\nImani | 42,000 |\nGus | 50,000 |\nLee | 99,999 |\nPriya | 100,000 |\nChen | (blank) |\n\nCommission policy (Harbor Analytics sales comp):\n- Deal amount under $50,000: 0% commission.\n- $50,000 up to but not including $100,000: 3%.\n- $100,000 and above: 5%.\n- The percent applies to the whole deal, not only the part above a threshold, but this sheet only needs the percent.\n- Blank deal amount: 0%.\n\nNotes:\n- Excel 2016 does not have IFS or SWITCH.\n- C is formatted as percent, so the formula should return 0.03 for 3%.\n- About 150 deals in rows 2-151.\n- Boundaries: exactly $50,000 earns 3%; exactly $100,000 earns 5%.","rules":[{"type":"codeBlocks","count":1},{"type":"maxProseWords","max":30}],"mistakes":[{"title":"Using IFS","why":"The AI picks IFS, which Excel 2016 doesn't have.","fix":"Add: \"Excel 2016: nested IF only, no IFS or SWITCH.\"","checks":["r0"]},{"title":"Wrong boundaries","why":"The AI uses > instead of >= so $50,000 earns 0%.","fix":"Add: \"Use >= for the boundaries: 50,000 gives 3%, 100,000 gives 5%.\"","checks":["r1"]},{"title":"Missing the tiers line","why":"The AI explains in a paragraph instead of one line.","fix":"Add: \"After the code, one line: Tiers: ... in under 20 words.\"","checks":["r2"]},{"title":"Leaving the format to chance","why":"The AI picks its own length and layout unless told the exact shape.","fix":"Add: \"Put the code in exactly 1 code block. Keep the writing outside the code under 30 words.\"","checks":["codeBlocks","maxProseWords"]}],"promptHints":[{"label":"Says nested IF","patterns":["nested if"]},{"label":"Names the Excel version","patterns":["2016","no ifs"]},{"label":"Gives the boundaries","patterns":[">=","50,?000","100,?000"]},{"label":"Handles blanks","patterns":["blank"]},{"label":"Fixes the format","patterns":["tiers:","single code block"]}],"hint":"Tiered formulas break at the boundaries. State which side each boundary falls on and the Excel version.","mission":"Write a commission tier formula.","musts":["Nested IF, no IFS","Boundaries correct","Blank gives 0"],"rubricLabels":["The formula is a nested IF (no IFS or SWITCH) that returns 0.05 for B2 >= 100000, 0.03 for B2 >= 50000 and otherwise 0","The boundaries are right: it uses >= 100000 and >= 50000, so 50,000 gives 3%, 99,999 gives 3% and 100,000 gives 5%","A blank B2 gives 0 (for example IF(B2=\"\",0,...) or the structure naturally gives 0), and the reply has a line starting 'Tiers:'"]}