Library › Coding AI › Real estate agents

Calculate an agent's take with a capped broker split

Practice: Giving the right context. About 5 minutes.

About this exercise

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.

Common mistakes when you ask AI for this

  • Not pointing at the plan cells. The AI types 2.5% and 30% into the formula, so next year's plan means editing every row. Try: Add: "Rates are in $H$1 and $H$2, the cap in $H$3."
  • Forgetting the cap. The AI takes a flat 30%, which shortchanges you on big deals. Try: Add: "Cap the brokerage share at $H$3 with MIN."
  • Leaving the result vague. The AI returns the brokerage's share or an unrounded number. Try: Add: "Return my take: commission minus the capped share, rounded to cents."
  • 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. By default the AI explains every part of the code at length, which you then have to scroll past. Try: Add: "After the code, one line under 10 words. Nothing else."

What a strong prompt includes

  • Points at the plan cells
  • Mentions the cap
  • Says whose share
  • Asks for one answer only
  • Limits the explanation

Practice this now ↑

Related exercises