How to Use Excel WORKDAY Formula and Conditional Formatting for Due Dates
Question details
Calculate task deadlines excluding weekends and holidays while keeping cells blank if no input is provided, and automatically color-code the due dates based on urgency using conditional formatting.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Tracking project deadlines, task due dates, or SLAs where weekends and holidays need to be excluded from the turnaround time, and upcoming deadlines need visual highlighting.
- Observed behavior
- Needs an automated formula configuration to calculate the precise due dates and a set of formatting rules to visually indicate whether a deadline is safely away, approaching, or overdue.
Before applying these formulas, ensure you have listed your official holiday dates in an empty column and defined that specific cell range with the name 'Holidays' so the functions can reference it correctly.
Calculate Deadlines and Apply Conditional Formatting Rules
Combine the WORKDAY function to compute the exact deadline with NETWORKDAYS conditional formatting rules to dynamically highlight cells based on remaining time.
Using nested IF and WORKDAY functions allows you to handle empty input cells gracefully. For the formatting, the NETWORKDAYS function compares the calculated deadline against TODAY() to determine how many workable days are left.
Select the target cell for your deadline (e.g., L2). Enter the formula `=IF(K2="","",WORKDAY(K2,10,Holidays))` and drag the fill handle to apply it down the column. This calculates a deadline 10 working days after the date in K2.
Highlight the range of cells in your deadline column. Navigate to the Home tab, click on 'Conditional Formatting', and select 'New Rule' > 'Use a formula to determine which cells to format'.
Enter the formula `=IFERROR(AND($K2<>"",NETWORKDAYS(TODAY(),$L2-1,Holidays)>=6),FALSE)`. Click 'Format', choose a green fill color, and click OK.
Create another New Rule. Enter the formula `=IFERROR(AND($K2<>"",NETWORKDAYS(TODAY(),$L2-1,Holidays)<6,NETWORKDAYS(TODAY(),$L2-1,Holidays)>=3),FALSE)`. Set the fill color to orange and click OK.
Create a final New Rule. Enter the formula `=IFERROR(AND($K2<>"",NETWORKDAYS(TODAY(),$L2-1,Holidays)<=1),FALSE)`. Set the fill color to red and apply the rule.

Easily Manage Advanced Date Formulas with WPS Spreadsheet
WPS Spreadsheet fully supports advanced date and time functions, including WORKDAY and NETWORKDAYS. You can seamlessly track project timelines and build complex conditional formatting rules just like you would in Microsoft Excel.
- 1. Launch WPS Spreadsheet: Open your project tracking workbook in WPS Office.
- 2. Define Name Range: Highlight your holiday dates, click the 'Formulas' tab, select 'Name Manager', and define the range as 'Holidays'.
- 3. Enter WORKDAY Formula: Type your WORKDAY formula into the deadline column to generate your target dates automatically.
- 4. Set Formatting Rules: Go to Home > Conditional Formatting > New Rule to input your NETWORKDAYS parameters and colorize your trackers.

Frequently Asked Questions
What is the difference between WORKDAY and WORKDAY.INTL?
WORKDAY automatically assumes that weekends fall on Saturday and Sunday. If your organization's workweek is different (for example, weekends are Friday and Saturday), use the WORKDAY.INTL function to specify your custom weekend parameters.
Why does my WORKDAY formula return a #NAME? error?
This error typically occurs if the named range 'Holidays' used in the formula has not been defined in your workbook. Check your Name Manager to ensure 'Holidays' correctly points to your list of holiday dates, or replace the word 'Holidays' with the direct cell references (e.g., $Z$2:$Z$10).
Why is my conditional formatting highlighting blank rows?
If you don't use an exclusion for blank cells, Excel might interpret a blank date cell as the numerical value 0 (which translates to the year 1900), triggering your 'overdue' red rule. Adding the condition `$K2<>""` inside your AND() formula prevents blank rows from being formatted.
How do I fix a #VALUE! error in my date calculation?
A #VALUE! error happens when the start date or one of the holiday dates is stored as text rather than a valid date. Select your date cells, ensure their format is set to 'Short Date' or 'Long Date', and remove any hidden spaces or text characters.




