How to Highlight Calendar Days Based on a Selected Schedule in Excel
Question details
The user needs to automatically highlight specific dates in an Excel calendar that correspond to a dynamically selected schedule, such as certain weekdays or weekends.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Setting up a dynamic calendar or shift tracker where the highlighted days automatically update when a new schedule criteria is entered into a specific cell.
- Observed behavior
- The goal is to apply a conditional formatting rule that correctly identifies and fills the calendar cells matching the defined schedule string.
Ensure your calendar is organized with weekday headers (e.g., Monday, Tuesday) in a single row, and designate a specific cell in your worksheet to input your desired schedule text (e.g., 'Monday, Wednesday').
Use ISNUMBER and SEARCH in Conditional Formatting
Create a conditional formatting rule using a custom formula to cross-reference the calendar's weekday headers with the text in your selected schedule cell.
By combining the ISNUMBER and SEARCH functions, Excel can look at your schedule input cell and determine if the current column's weekday header is mentioned. If it finds a match, it triggers the conditional formatting to highlight the corresponding cells.
It is highly important to use the correct absolute and relative references (the dollar signs) so the formula checks the correct header and schedule cell for every day in the calendar.
Highlight the entire range of cells containing the calendar days that you want to be conditionally formatted.
Navigate to the 'Home' tab on the Excel ribbon, click on 'Conditional Formatting' in the Styles group, and choose 'New Rule' from the dropdown menu.
In the New Formatting Rule dialog box, click on 'Use a formula to determine which cells to format'.
In the formula bar, type: =ISNUMBER(SEARCH(B$1,$A$2)). Replace 'B$1' with the cell reference for your first weekday header (keeping the dollar sign before the row number), and replace '$A$2' with the absolute reference of your schedule input cell.
Click the 'Format' button, go to the 'Fill' tab, select your preferred highlight color, and click 'OK' twice to apply the rule.

Easily Format Dynamic Calendars with WPS Spreadsheet
WPS Spreadsheet features robust conditional formatting capabilities identical to Excel, allowing you to highlight custom schedules seamlessly. It supports all standard Excel formulas, ensuring your dynamic calendars are visually appealing and function perfectly without a steep learning curve.
- 1. Open your file: Launch WPS Spreadsheet and open your existing calendar workbook.
- 2. Select the calendar area: Highlight the block of cells that represent the days in your calendar.
- 3. Access formatting tools: Go to the 'Home' tab, click 'Conditional Formatting', and select 'New Rule'.
- 4. Apply the custom formula: Choose 'Use a formula to determine which cells to format', and input your =ISNUMBER(SEARCH(...)) formula.
- 5. Choose a color: Click 'Format' to select your highlight fill color, then click 'OK' to instantly view your formatted schedule.

Frequently Asked Questions
Why isn't my conditional formatting formula highlighting the correct days?
This usually happens due to incorrect absolute or relative cell references. Double-check that your formula uses a dollar sign to lock the row for the day headers (e.g., B$1) and locks both the row and column for the schedule reference cell (e.g., $A$2).
Can I automatically highlight weekends without typing them into a schedule cell?
Yes, you can use the WEEKDAY function instead of SEARCH. Create a new conditional formatting rule using the formula =WEEKDAY(B1, 2)>5 (assuming B1 contains your date value). This will automatically highlight Saturdays and Sundays.
Does this formula work if my schedule cell contains multiple days, like 'Monday, Wednesday'?
Yes. The SEARCH function is designed to look for the specific weekday string (e.g., 'Monday' from your header) within the entire text string of the schedule cell. As long as the header text matches a word typed in the schedule cell, it will highlight correctly.




