{"id":"code-work-office-explain-room-finder-formula","audience":"office","category":"coding","track":"coding","technique":"audience","title":"Explain a room-finder formula to the office manager","free":false,"task":"Hal, the office manager, keeps getting rooms that are bigger than needed from the room-finder cell. Copy the formula into one code block, then write exactly 3 numbered lines labeled Returns:, Says None when: and Fix:, each one plain sentence with no function names or cell references. Returns: must say it picks the first room in list order, not the best-sized one. Fix: must tell Hal to sort the Rooms tab by Seats, smallest first, so no formula change is needed. Under 70 words outside the code.","materialLabel":"The formula and the Rooms tab (attached to your prompt automatically)","material":"BOOKING HELPER sheet - cell F2 (label: \"Suggested room\")\n\n=IFERROR(INDEX(Rooms!A2:A9,MATCH(1,(Rooms!C2:C9>=E2)*(Rooms!D2:D9=\"Yes\"),0)),\"None\")\n\nE2 = number of people in the meeting (typed in)\n\nRooms tab (row 1 is headers)\nA Room | B Floor | C Seats | D Video\nAtrium | 1 | 40 | Yes\nRoom A | 2 | 12 | Yes\nRoom B | 2 | 6 | No\nRoom C | 3 | 8 | Yes\nRoom D | 3 | 4 | Yes\nFocus 1 | 4 | 2 | No\n\nHal's message: \"I typed 4 people and it told me the Atrium. Is it broken?\"\n\nNotes:\n- The Rooms tab was set up in order of floor.\n- The Atrium is shared with the 3rd floor tenant.\n- Built by a temp last spring.","rules":[{"type":"codeBlocks","count":1},{"type":"numberedItems","count":3},{"type":"maxProseWords","max":70}],"mistakes":[{"title":"Not saying who reads it","why":"The AI explains array math that Hal won't follow.","fix":"Add: \"For an office manager: no function names or cell references.\"","checks":["r2"]},{"title":"Not asking about his problem","why":"The AI explains the formula but not why it picked the Atrium.","fix":"Add: \"Say it picks the first room in list order, not the best fit.\"","checks":["r0"]},{"title":"Rewriting the formula","why":"The AI hands Hal a new, harder formula instead of the simple fix he can do himself.","fix":"Add: \"Fix: sort the Rooms tab by Seats, smallest first; no formula change.\"","checks":["r1"]},{"title":"Leaving the shape open","why":"The AI writes a long breakdown of each part.","fix":"Add: \"Exactly 3 numbered lines labeled Returns:, Says None when:, Fix:.\"","checks":["numberedItems"]},{"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 20 words. Nothing else.\"","checks":["maxProseWords"]}],"promptHints":[{"label":"Says who it's for","patterns":["hal","office manager","non-?technical","plain"]},{"label":"Explains his surprise","patterns":["first room","list order","atrium","best fit"]},{"label":"Asks for labeled lines","patterns":["returns:","says none","labeled","numbered"]},{"label":"Asks for a simple fix","patterns":["fix:","sort","smallest"]}],"hint":"Hal wants to know why it suggested the Atrium. Ask the AI to explain that in plain words, in the two lines you need.","rubricLabels":["The Returns: line says it gives the first room in the Rooms list (in list order) that has enough seats and has video, which is why 4 people gets the Atrium","The Fix: line tells Hal to sort the Rooms tab by Seats from smallest to largest, so the first match is the smallest room that fits, without changing the formula","None of the 3 lines uses a function name (like INDEX, MATCH or IFERROR) or a cell reference (like E2 or C2:C9)"]}