{"id":"sheet-hr-cert-expiry-color-rules","audience":"hr","category":"spreadsheets","track":"data","technique":"constraints","title":"Write color rules for expiring certifications","free":false,"task":"You want the Certifications sheet (A2:E60) to color whole rows red when a certification has expired and yellow when it expires within the next 30 days, and rows with a blank expiry date must stay uncolored. Ask for exactly 3 numbered lines: Red: with its custom formula, Yellow: with its custom formula, and Apply to: with the range. Plain text, under 70 words.","materialLabel":"Your Certifications sheet (attached to your prompt automatically)","material":"Sheet: Certifications (Google Sheets), rows 2-60\n\nA Employee | B Role | C Certification | D Expires | E Notes\nHana Brooks | Lifeguard | CPR/AED | 2026-10-15 |\nOmar Said | Lifeguard | CPR/AED | 2026-11-20 |\nRita Vance | Front desk | (none) |  | not required for role\nCal Mendez | Maintenance | Forklift | 2027-03-01 |\nJune Park | Swim coach | First Aid | 2026-12-01 |\nTheo Lund | Front desk | (none) |  | not required for role\nIvy Chen | Lifeguard | CPR/AED | 2026-11-08 | renewal class booked\n\nNotes:\n- 14 of 59 rows have no expiry date because the role doesn't need one\n- Last time I tried \"less than today\" the whole front desk team turned red\n- Column D is formatted as dates","rules":[{"type":"numberedItems","count":3},{"type":"maxWords","max":70},{"type":"plainText"}],"mistakes":[{"title":"Forgetting blank cells","why":"A blank date counts as \"before today\", so the AI's formula turns every no-cert row red.","fix":"Add: \"Blank expiry dates must stay uncolored.\"","checks":["r0","r1"]},{"title":"Coloring one cell, not the row","why":"The AI writes =D2<TODAY(), which only colors properly in column D.","fix":"Add: \"Color whole rows across A2:E60; lock the column with $D2.\"","checks":["r2"]},{"title":"Getting menu steps","why":"The AI explains where to click in the Format menu instead of giving the rules.","fix":"Say: \"Exactly 3 lines: Red:, Yellow:, Apply to:.\"","checks":["numberedItems","maxWords"]},{"title":"Getting markdown back","why":"AI bolds the color names and adds headings.","fix":"Ask for \"plain text, no bold.\"","checks":["plainText"]}],"promptHints":[{"label":"Handles blank dates","patterns":["blank","empty","<>\"\"","no (expiry|date)"]},{"label":"Colors whole rows","patterns":["whole row","\\$d2","a2:e60","entire row"]},{"label":"Gives the 30-day window","patterns":["30 days","\\+30","next month"]},{"label":"Names the 3 lines","patterns":["red:","yellow:","apply to"]},{"label":"Asks for plain text","patterns":["plain","no bold","no markdown"]}],"hint":"Blank cells are where color rules go wrong. Tell the AI what blanks should do and that you want whole rows colored.","rubricLabels":["The Red: formula checks that the column D date is before today and also that the cell isn't blank (for example =AND($D2<>\"\",$D2<TODAY()))","The Yellow: formula covers dates from today through 30 days from today (for example =AND($D2>=TODAY(),$D2<=TODAY()+30)) and leaves blank dates uncolored","Both formulas lock the column with $D2 (so the whole row colors), and the Apply to: line gives A2:E60"]}