{"id":"code-work-re-commission-split-cap","audience":"real-estate","category":"coding","track":"coding","technique":"context","title":"Calculate an agent's take with a capped broker split","free":false,"task":"Write one Google Sheets formula for Deals!D2 (filled down) that gives the agent's take on the sale price in B2. Commission is the rate in $H$1, the brokerage keeps the share in $H$2 of that commission, but the brokerage's share is capped at the amount in $H$3 per deal. Agent's take = commission minus the brokerage's capped share, rounded to cents. No typed-in rates or amounts. One formula in one code block, then under 25 words outside the code.","materialLabel":"Deals sheet and plan (attached to your prompt automatically)","material":"DEALS sheet - Nina Park, closings this year (row 1 is headers)\nA Address | B Sale price | C Close date | D Agent take\n14 Alder Ln | 615,000 | 03/20/2026 | ?\n2201 Larch St | 1,250,000 | 06/02/2026 | ?\n88 Cedar Row #4 | 389,000 | 08/15/2026 | ?\n410 Birch Ave | 2,100,000 | 10/09/2026 | ?\n\nPlan cells:\nH1: 2.5% (commission rate on these listings)\nH2: 30% (brokerage share)\nH3: 6,000 (brokerage cap per deal)\n\nNotes from Nina:\n- My old spreadsheet took 30% of everything, so big deals looked worse than they were.\n- Referral fees come out after this, on a different tab.\n- The brokerage reviews the cap every January.\n- Taxes aren't part of this sheet.","rules":[{"type":"codeBlocks","count":1},{"type":"maxProseWords","max":25}],"mistakes":[{"title":"Not pointing at the plan cells","why":"The AI types 2.5% and 30% into the formula, so next year's plan means editing every row.","fix":"Add: \"Rates are in $H$1 and $H$2, the cap in $H$3.\"","checks":["r0"]},{"title":"Forgetting the cap","why":"The AI takes a flat 30%, which shortchanges you on big deals.","fix":"Add: \"Cap the brokerage share at $H$3 with MIN.\"","checks":["r1"]},{"title":"Leaving the result vague","why":"The AI returns the brokerage's share or an unrounded number.","fix":"Add: \"Return my take: commission minus the capped share, rounded to cents.\"","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":"Points at the plan cells","patterns":["h1","h2","h3"]},{"label":"Mentions the cap","patterns":["cap","min\\("]},{"label":"Says whose share","patterns":["agent'?s take","my (take|share)","minus"]},{"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":"Tell the AI where each number of the plan lives and that the brokerage share has a ceiling.","rubricLabels":["Computes the commission as B2 times the rate in $H$1 and the brokerage share with $H$2, using locked cells and no typed-in 2.5%, 30% or 6,000","Caps the brokerage's share at $H$3 with MIN (for example MIN(B2*$H$1*$H$2,$H$3)), so on 2,100,000 the brokerage takes 6,000, not 15,750","Returns the commission minus the capped share, rounded to 2 decimals with ROUND(...,2)"]}