Library › Data AI › Operations and supply chain

Write a due-date formula with an urgent-ticket rule

  • For Operations and supply chain
  • You practice Setting limits and rules
  • Time about 5 minutes
  • Level Intermediate

About this exercise

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.

Common mistakes when you ask AI for this

  • Counting calendar days. The AI adds days with B2+5, which counts weekends. Try: Add: "WORKDAY with the holiday range Holidays!A2:A12."
  • Wrong priority rule. The AI gives High or Low different days. Try: Add: "IF(C2=\"Urgent\",2,5): everyone else is 5."
  • Errors on blank rows. A blank opened date returns a 1900 date. Try: Add: "If B2 is empty, return a blank."
  • Leaving the format to chance. The AI picks its own length and layout unless told the exact shape. Try: Add: "Put the code in exactly 1 code block. Keep the writing outside the code under 15 words."

What a strong prompt includes

  • Names WORKDAY
  • Gives the priority rule
  • Names the holidays
  • Handles blanks
  • Asks for the example line

Practice this now ↑

Related exercises