How to Apply Conditional Formatting for Dates Within a Two-Week Threshold
Question details
The user needs to dynamically highlight recommended delivery dates that differ from the promised delivery dates by a 14-day threshold.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Tracking delivery dates and visually flagging discrepancies of 14 days or more using custom rules.
- Observed behavior
- The user requires a conditional formatting setup that dynamically compares two date columns and highlights variances either beyond or within a two-week range.
Ensure your promised dates and suggested dates are formatted correctly as 'Date' values in your spreadsheet, rather than plain text, so the mathematical formula can calculate the date differences accurately.
Use Formula-Based Conditional Formatting for Date Variances
Create a custom conditional formatting rule using a simple mathematical formula to compare the variance between two date columns.
By using a formula in conditional formatting, you can dynamically compare values across different columns. This method allows you to subtract or add 14 days from the promised date to set your exact highlight threshold.
Highlight the cells containing the suggested dates you want to format. For example, select cells B2 through B20.
Navigate to the 'Home' tab on the top ribbon, click on the 'Conditional Formatting' dropdown, and select 'New Rule'.
Choose the option 'Use a formula to determine which cells to format'. To highlight dates more than 14 days earlier than the promised date, enter the formula `=B2<A2-14` (assuming A2 contains the promised date and B2 is the active cell in your selected range).
Click the 'Format' button, choose your preferred fill color or font style to make the flagged dates stand out, and click 'OK' to apply the rule to your selection.

Easily Highlight Date Variances with WPS Spreadsheet
WPS Spreadsheet provides powerful and intuitive conditional formatting features, allowing you to highlight complex data variances, like two-week date thresholds, with just a few clicks.
- 1. Open your file in WPS: Launch WPS Spreadsheet and open your document containing the delivery dates.
- 2. Select your data: Highlight the suggested dates column you wish to dynamically format.
- 3. Apply Conditional Formatting: Navigate to Home > Conditional Formatting > New Rule to input your custom threshold formula.

Frequently Asked Questions
Why is my conditional formatting formula not highlighting the correct dates?
This usually happens if your cell references are absolute (e.g., $A$2) instead of relative (e.g., A2), or if the cells contain text rather than valid date formats. Ensure you use relative references for the rows so the rule shifts dynamically for each cell in the selected range.
Can I highlight dates that fall exactly within a two-week range?
Yes, you can use the AND function in your conditional formatting formula. For example, entering `=AND(B2>=A2-14, B2<=A2+14)` will highlight any date in B2 that falls strictly within 14 days before or after the reference date in A2.
How do I clear conditional formatting rules if I make a mistake?
To remove a rule, go to the Home tab, click on Conditional Formatting, select 'Clear Rules', and choose either 'Clear Rules from Selected Cells' or 'Clear Rules from Entire Sheet'.




