{"id":"sheet-tch-school-days-late-formula","audience":"teachers","category":"spreadsheets","track":"data","technique":"context","title":"Count school days late, skipping weekends and holidays","free":false,"task":"Your late-work policy counts school days only, so weekends and the dates on your Holidays tab (A2:A12) don't count, and work turned in on or before the due date is 0 days late, never negative. Ask for one formula for E2 in one code block, then one line starting Example: that walks through the Nov 25 to Nov 30 row in plain words. Under 50 words outside the code.","materialLabel":"Your late-work sheet (attached to your prompt automatically)","material":"LATE WORK tab (Google Sheets)\nA Student | B Assignment | C Due | D Turned in | E School days late\nAvery N. | Lab report 4 | Fri 2026-11-20 | Mon 2026-11-23 |\nBo Reyes | Lab report 4 | Fri 2026-11-20 | Wed 2026-11-18 |\nCam Liu | Reading log | Wed 2026-11-25 | Mon 2026-11-30 |\nDina Fox | Reading log | Wed 2026-11-25 | Wed 2026-11-25 |\nEli Moss | Unit test retake | Tue 2026-12-01 | Fri 2026-12-04 |\n\nHOLIDAYS tab\nA2: 2026-11-11 (Veterans Day)\nA3: 2026-11-26 (Thanksgiving)\nA4: 2026-11-27 (Thanksgiving break)\nA5: 2026-12-21 ... A12: 2027-01-01 (winter break)\n\nNotes:\n- Policy: minus 5% per school day late, max 3 days\n- Parents get a copy of this sheet at conferences\n- Last year I used =D2-C2 and parents complained it counted weekends","rules":[{"type":"codeBlocks","count":1},{"type":"maxCodeLines","max":1},{"type":"maxProseWords","max":50}],"mistakes":[{"title":"Leaving out the holidays","why":"The AI skips weekends but counts Thanksgiving as school days.","fix":"Add: \"Skip dates on Holidays!A2:A12.\"","checks":["r0"]},{"title":"Not saying how early work counts","why":"The AI's formula shows -3 for work turned in early and counts the due date as a late day.","fix":"Add: \"On or before the due date is 0, never negative.\"","checks":["r1"]},{"title":"No worked example","why":"The AI explains the formula in jargon parents can't follow.","fix":"Add: \"Example: walk through the Nov 25 to Nov 30 row in plain words.\"","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","maxCodeLines"]},{"title":"Getting a tutorial","why":"By default the AI explains every part of the formula at length.","fix":"Add: \"After the code, one line under 30 words. Nothing else.\"","checks":["maxProseWords"]}],"promptHints":[{"label":"Mentions the holiday list","patterns":["holiday","a2:a12"]},{"label":"Handles on-time and early work","patterns":["never negative","\\b0\\b","on or before","early"]},{"label":"Asks for a worked example","patterns":["example","nov(ember)? 25","walk through"]},{"label":"Asks for one formula","patterns":["one formula","one code block","single formula","no alternatives"]}],"hint":"Date math has edge cases: holidays, the due date itself, and early work. Spell out each one and ask for an example a parent can follow.","rubricLabels":["The formula counts working days between C2 and D2 using NETWORKDAYS (or NETWORKDAYS.INTL) with the holiday range Holidays!A2:A12","The formula subtracts 1 so the due date itself isn't counted, and wraps the result so early or on-time work shows 0, not a negative (for example MAX(0, ...))","The Example: line says Cam's reading log (due Nov 25, in Nov 30) is 1 school day late because Thanksgiving break and the weekend don't count"]}