How to Create an Employee Shift Schedule Graph Using Conditional Formatting in Excel
Question details
The user wants to build a dynamic employee schedule graph that automatically highlights working hours based on shift text data stored on a separate sheet.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Visualizing employee shifts across different times of the day using dynamic data arrays and formatting rules.
- Observed behavior
- A visual schedule graph highlighting occupied hours, with the need to accurately handle full hours and partial hour shifts (e.g., half-hour or quarter-hour shifts) using data bars or cell fill colors.
Ensure your shift schedule data is organized in a structured table on a separate sheet, and verify that your Excel version supports dynamic array functions (like LET and FILTER) if you plan to use complex dynamic formulas.
Apply Conditional Formatting with Formulas for Full Hours
Use a dynamic formula inside the conditional formatting rule to compare time headers with shift start and end times, highlighting full working hours automatically.
This method relies on logical formulas to evaluate whether a specific column's time header falls between an employee's shift start and end time. It is highly effective for shifts that begin and end exactly on the hour.
In your schedule graph sheet, create time headers (e.g., 8:00 AM, 9:00 AM) in a single row across the top columns.
Use text-parsing functions like TEXTBEFORE and TEXTAFTER combined with TIMEVALUE to extract the exact start and end times from the text strings on your separate Schedule sheet.
Highlight the empty cells below your time headers. Go to the 'Home' tab, click 'Conditional Formatting', and select 'New Rule'.
Choose 'Use a formula to determine which cells to format'. Enter a logical formula (such as checking if the column's time header is >= the start time and < the end time) to return TRUE for working hours.
Click 'Format', choose a distinct fill color (like blue) under the Fill tab, and click 'OK' to apply the formatting across the schedule grid.
Use Conditional Formatting Data Bars for Partial Hours
Utilize Data Bars within conditional formatting to accurately represent half-hour or quarter-hour shifts at the beginning or end of a workday.
Build Visual Employee Schedules in WPS Spreadsheet
WPS Spreadsheet supports advanced conditional formatting, dynamic array formulas, and precise Data Bars to help you manage and visualize employee shifts seamlessly. It's a fantastic, highly compatible alternative for schedule management.
- 1. Prepare your shift data: Open WPS Spreadsheet and organize your employee shift text (e.g., '08:00-16:00') in a dedicated 'Schedule' sheet.
- 2. Design the schedule grid: In your visual schedule sheet, create time headers across the top columns and list employee names down the first column.
- 3. Open Conditional Formatting: Highlight the grid area where shift blocks should appear. Navigate to the 'Home' tab and click 'Conditional Formatting' > 'New Rule'.
- 4. Apply the time-checking formula: Select 'Use a formula to format cells' and input your dynamic time-comparison formula to automatically verify if a cell falls within an employee's shift.
- 5. Customize cell appearance: Click the format button, select a vibrant fill color to represent a working shift, and click 'OK' to instantly generate your visual schedule.

Frequently Asked Questions
How can I adjust my schedule graph for 15-minute or 30-minute shift increments?
To handle partial hours accurately, you can either expand your time header columns to 15-minute intervals (e.g., 8:00, 8:15, 8:30) and apply the same conditional formatting formula, or use Data Bars with fractional values (between 0 and 1) to show partial gradients inside a standard 1-hour cell.
Why is my TIMEVALUE function returning a #VALUE! error?
The TIMEVALUE function will return a #VALUE! error if the text it is parsing does not represent a recognized time format. Ensure your raw shift text uses standard time formats (like '8:00 AM - 5:00 PM' or '08:00-17:00') and verify that your TEXTBEFORE or TEXTAFTER formula accurately strips away extra spaces or hyphens.
Can I highlight different shift types with different colors automatically?
Yes, you can create multiple Conditional Formatting rules for the exact same grid range. In the 'Manage Rules' dialog, set up separate formulas targeting specific criteria (e.g., morning shifts vs. night shifts, or referencing a 'Shift Type' column) and assign a unique fill color to each respective rule.




