{"id":"code-work-office-workday-due-dates","audience":"office","category":"coding","track":"coding","technique":"context","title":"Set due dates five business days out, skipping holidays","free":false,"task":"Write the formula for Requests!E2 (filled down) that sets the due date 5 business days after the received date in C2, skipping weekends and the company holidays listed on the tab named Holidays in A2:A15. Rows with no received date must stay blank. One formula in one code block, then under 25 words outside the code.","materialLabel":"Requests sheet preview (attached to your prompt automatically)","material":"REQUESTS sheet - IT equipment requests (row 1 is headers)\nA Ticket | B Requester | C Received | D Item | E Due\nIT-2201 | Ana Ortiz | 11/20/2026 | Laptop charger | ?\nIT-2202 | Raj Mehta | 11/23/2026 | Second monitor | ?\nIT-2203 | Mei Wu | 11/25/2026 | Headset | ?\nIT-2204 | Lou Grant | | Docking station | ?\nIT-2205 | Pat O'Neil | 12/22/2026 | Keyboard | ?\n\nCompany holidays this year: Nov 26 and 27 (Thanksgiving), Dec 24 and 25, Jan 1. The full list for next year is still being approved by HR.\n\nNotes:\n- Our promise to staff is \"within a week\", but we count only working days.\n- Lou's request came by phone; Hal will add the date.\n- Equipment ships from the main office on Tuesdays and Thursdays.\n- Last year Thanksgiving week requests were late because we counted the holiday.","rules":[{"type":"codeBlocks","count":1},{"type":"maxProseWords","max":25}],"mistakes":[{"title":"Leaving \"a week\" vague","why":"The AI adds 7 calendar days, which ignores weekends and holidays.","fix":"Add: \"5 business days with WORKDAY.\"","checks":["r0"]},{"title":"Not pointing at the holiday list","why":"The AI types holiday dates into the formula or skips them.","fix":"Add: \"Holidays are on the Holidays tab, A2:A15.\"","checks":["r1"]},{"title":"Forgetting empty rows","why":"A blank date turns into a due date in January 1900.","fix":"Add: \"If C2 is empty, leave E2 blank.\"","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":"Says business days","patterns":["business days?","working days?","workday"]},{"label":"Points at the holiday list","patterns":["holidays!","holidays tab","a2:a15"]},{"label":"Handles blank dates","patterns":["blank","empty"]},{"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":"\"Within a week\" can mean many things. Tell the AI it's 5 working days and where your holiday list lives.","rubricLabels":["Uses WORKDAY on C2 with 5 days (or WORKDAY.INTL with weekend code 1), not C2+5 or C2+7","Passes the locked holiday range Holidays!$A$2:$A$15 as the holidays argument, not typed-in dates","Returns blank (\"\") when C2 is empty"]}