{"id":"data2-formula-sla-due-date-workday-priority","audience":"operations","category":"spreadsheets","track":"data","technique":"constraints","level":"intermediate","title":"Write a due-date formula with an urgent-ticket rule","free":false,"task":"Support ops needs an SLA due date in D2 from the opened date in B2 and priority in C2. Ask for one Excel formula in a single code block, then one line starting 'Example:' under 15 words. Urgent tickets are due in 2 working days and every other priority in 5 working days, counting Monday to Friday and skipping the holidays listed in Holidays!A2:A12. A blank opened date should give a blank.","materialLabel":"Your sheet (attached to your prompt automatically)","material":"Sheet: Tickets (Excel 2016) - Granite Support\n\nA Ticket | B Opened | C Priority | D SLA due\nT-4001 | 2025-11-03 | Urgent |\nT-4002 | 2025-11-03 | Normal |\nT-4003 | 2025-11-06 | Low |\nT-4004 | (blank) | Normal |\n\nTab \"Holidays\": A1 header \"Holiday\"; A2:A12 hold up to 11 company holidays as real dates (some cells empty).\n\nNotes:\n- Priority values: Urgent, High, Normal, Low.\n- About 2,000 rows.\n- Column D should be formatted as a date.\n- Opened dates are real dates, not text.\n- The day a ticket is opened is not counted: if opened Monday, 2 working days later is Wednesday.\n- Excel 2016.","rules":[{"type":"codeBlocks","count":1},{"type":"maxProseWords","max":15}],"mistakes":[{"title":"Counting calendar days","why":"The AI adds days with B2+5, which counts weekends.","fix":"Add: \"WORKDAY with the holiday range Holidays!A2:A12.\"","checks":["r0"]},{"title":"Wrong priority rule","why":"The AI gives High or Low different days.","fix":"Add: \"IF(C2=\\\"Urgent\\\",2,5): everyone else is 5.\"","checks":["r1"]},{"title":"Errors on blank rows","why":"A blank opened date returns a 1900 date.","fix":"Add: \"If B2 is empty, return a blank.\"","checks":["r2"]},{"title":"Leaving the format to chance","why":"The AI picks its own length and layout unless told the exact shape.","fix":"Add: \"Put the code in exactly 1 code block. Keep the writing outside the code under 15 words.\"","checks":["codeBlocks","maxProseWords"]}],"promptHints":[{"label":"Names WORKDAY","patterns":["workday"]},{"label":"Gives the priority rule","patterns":["urgent","2","5"]},{"label":"Names the holidays","patterns":["holidays"]},{"label":"Handles blanks","patterns":["blank","empty"]},{"label":"Asks for the example line","patterns":["example:"]}],"hint":"SLA formulas combine a working-day function, a priority rule and the holiday list. Name all three.","mission":"Write an SLA due date formula.","musts":["WORKDAY with holidays","Urgent 2 and others 5","Blank if no date"],"rubricLabels":["The formula uses WORKDAY (or WORKDAY.INTL) from B2 and includes the holiday range Holidays!A2:A12","The number of days is IF(C2=\"Urgent\",2,5), so only Urgent gets 2 working days and every other priority gets 5","It returns a blank (\"\") when B2 is empty, and the reply has a line starting 'Example:' giving 2025-11-10 for a Normal ticket opened 2025-11-03 (or 2025-11-05 for Urgent)"]}