{"id":"code-work-sb-tip-pool-split","audience":"small-business","category":"coding","track":"coding","technique":"context","title":"Split a tip pool by hours, leaving managers out","free":false,"task":"Write one formula for Tips!E2 (filled down to E9) that gives each person's share of the tip pool in $B$11, in proportion to hours in column C. Managers, marked Mgr in column D, get no share, and their hours must not count in the total either. Round each share to cents with ROUND. One formula in one code block, then under 25 words outside the code.","materialLabel":"This week's tip sheet (attached to your prompt automatically)","material":"TIPS sheet - Juniper Cafe, week of Nov 2 (row 1 is headers)\nA Name | B Shift lead? | C Hours | D Role | E Share\nAna Ortiz | No | 32 | Barista | ?\nRaj Mehta | Yes | 38 | Barista | ?\nMei Wu | No | 20 | Barista | ?\nLou Grant | No | 40 | Mgr | ?\nPat O'Neil | No | 16 | Kitchen | ?\nJae Kim | No | 24 | Kitchen | ?\nDana Ruiz | No | 30 | Mgr | ?\nTheo Brandt | No | 12 | Barista | ?\n\nB11: 1,980.00 (total tips this week, cash plus card)\n\nNotes from Lou:\n- Shift leads get the same rate per hour as everyone else.\n- Card tips arrive on Tuesday.\n- Last month the sheet split tips across everyone, managers included, and two baristas noticed.\n- Kitchen staff joined the pool in October.","rules":[{"type":"codeBlocks","count":1},{"type":"maxProseWords","max":25}],"mistakes":[{"title":"Not mentioning managers","why":"The AI splits across everyone's hours, so managers take a cut.","fix":"Add: \"Mgr rows get 0 and their hours don't count in the total.\"","checks":["r0","r1"]},{"title":"Leaving rounding out","why":"Shares come out like 140.540540, which can't be paid out.","fix":"Add: \"Round each share to cents with ROUND(...,2).\"","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":"Mentions managers","patterns":["mgr","manager"]},{"label":"Points at the pool cell","patterns":["b11","pool"]},{"label":"Asks for rounding","patterns":["round","cents"]},{"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":"The sheet lists managers, but nothing says they're out of the pool. Tell the AI, including what that does to the total hours.","rubricLabels":["Divides the pool in $B$11 (locked) by total non-manager hours, such as SUMIF($D$2:$D$9,\"<>Mgr\",$C$2:$C$9), and multiplies by C2","Returns 0 for managers (an IF on D2 = \"Mgr\"), so Lou and Dana get nothing","Rounds each share to 2 decimals with ROUND(...,2)"]}