Formatting Issues

How to Apply Multiple Date-Based Conditional Formatting Rules in Excel

Adam DavisAdam Davis Nov 10, 2026 869 views

Question details

The user needs to format patient-name cells using multiple conditions based on an appointment date and prescription status.

How to Apply Multiple Date-Based Conditional Formatting Rules in Excel
Product
Excel
Device & OS
not provided
Scenario
Tracking medical appointments and prescription statuses with automated visual alerts (red, yellow, white) depending on the proximity of the appointment date and if a prescription is received.
Observed behavior
Cells need to dynamically change color based on complex criteria involving date differences against the current date and whether certain cells are blank.
Before you start

Ensure your appointment dates are properly formatted as recognizable Excel dates, and identify the exact columns containing your date values and status indicators before creating the rules.

Solution 1Recommended

Using Formula-Based Conditional Formatting with AND and TODAY Functions

Create custom formatting rules using the AND and TODAY functions to evaluate multiple criteria simultaneously, prioritizing them with the 'Stop If True' feature.

You can use the AND function combined with TODAY() to check if multiple conditions are met at the same time, such as whether a date falls within a specific range and another adjacent cell remains blank. Setting up multiple rules requires careful ordering to ensure the correct color is applied when overlapping conditions occur.

1
Select the target cells

Highlight the patient-name cells in column D (or the specific range you want to color format).

2
Open Conditional Formatting

Navigate to Home > Conditional Formatting > New Rule > Select 'Use a formula to determine which cells to format'.

3
Add the Red condition formula

Enter the formula for an injection within four days and no prescription: =AND($F13<>"",$O13="",$F13-TODAY()<=4). Click 'Format', choose a red fill color, and click OK.

4
Add the Yellow condition formula

Repeat the New Rule process and enter the formula for an injection between four and six days away: =AND($F13<>"",$O13="",$F13-TODAY()<=6,$F13-TODAY()>4). Format with a yellow fill color.

5
Add the White condition formula

Repeat the New Rule process one more time for an injection more than eight days away: =AND($F13<>"",$O13="",$F13-TODAY()>8). Format with a white fill color.

6
Manage rules and enable Stop If True

Go to Home > Conditional Formatting > Manage Rules. Ensure the rules are ordered Red at the top, followed by Yellow, and then White. Check the 'Stop If True' box next to each rule to prevent conflicting formats from being applied, then click Apply.

Using Formula-Based Conditional Formatting with AND and TODAY Functions
Using Absolute Column References: Pay attention to the dollar signs in the formulas (e.g., $F13). Locking the column with a dollar sign ensures that even if you apply this rule to an entire row, the formatting will always be based strictly on the values in columns F and O.
Advanced Formatting Made Easy

Apply Complex Conditional Formatting Effortlessly in WPS Spreadsheet

WPS Spreadsheet offers powerful, fully compatible conditional formatting features that support advanced formulas like TODAY() and AND(), allowing you to manage complex scheduling data and visual alerts effortlessly.

  1. 1. Open your data: Launch WPS Spreadsheet and open your appointment tracking workbook.
  2. 2. Access Conditional Formatting: Highlight your target range, then navigate to 'Home' > 'Conditional Formatting' > 'New Rule'.
  3. 3. Apply Formulas: Select 'Use a formula to determine which cells to format', enter your AND/TODAY formulas, and customize the background colors.
  4. 4. Manage Rules: Click 'Manage Rules' to arrange rule priority and enable the 'Stop If True' checkbox to ensure accurate formatting.
100% compatible with Microsoft Excel conditional formatting rules and formulasIntuitive rule manager to easily reorder conditions and apply 'Stop If True' logicLightweight and highly responsive, even when applying complex formats across thousands of rows
QA img-9

Frequently Asked Questions

What does the 'Stop If True' checkbox do in Conditional Formatting?

The 'Stop If True' checkbox tells the spreadsheet software to stop evaluating subsequent formatting rules if the current rule's condition is met. This is critical when you have multiple rules that might overlap or apply to the same cell, ensuring the highest priority rule is the only one applied.

Why aren't my date formulas working correctly in the formatting rule?

Ensure that your date cells are recognized as actual dates (serial numbers) by the software, not as text strings. Additionally, verify that your absolute and relative cell references (using the $ sign) correctly point to the intended columns for evaluation.

Can I apply these date rules to the entire row instead of just one cell?

Yes. Select the entire range of rows before creating the conditional formatting rule. You must make sure to lock the column reference in your formula with a dollar sign (e.g., use $F13 instead of F13) so that every cell in the row evaluates the date from the correct column.

How do I edit a conditional formatting rule I have already created?

Highlight the affected cells, navigate to the Home tab, click Conditional Formatting, and select 'Manage Rules'. Choose the specific rule you want to modify from the list and click 'Edit Rule' to update the formula or change the color formatting.