Formatting Issues

Highlight Employee Annual Leave Dates in an Excel Dashboard

Phi Hung VoPhi Hung Vo Dec 2, 2026 869 views

Question details

Highlight dashboard dates when an employee has booked annual leave, including when the employee has multiple leave ranges.

Highlight Employee Annual Leave Dates in an Excel Dashboard
Product
Microsoft Excel
Device & OS
not provided
Scenario
A dashboard lists employees by row and dates by column, while a separate table records each employee's leave start and end dates.
Observed behavior
Dashboard cells should be highlighted when their employee and date match any recorded leave range.
Before you start

Confirm that dashboard dates and leave start and end dates are stored as actual dates, and that employee names match between the dashboard and leave table. The example uses names in A3:A6, dashboard dates in B2:AP2, and leave records in A12:C19 on the same sheet.

Solution 1Recommended

Use a SUMPRODUCT conditional formatting rule

Highlight every dashboard date that falls within any leave range for the employee on that row.

The rule checks all leave records for a matching employee and a date between the start and end dates, inclusive. The mixed references let the rule adjust across the dashboard.

1
Select the dashboard cells

In Excel, select B3:AP6, starting with B3 as the active cell.

2
Create a formula rule

Go to Home > Conditional Formatting > New Rule, then choose Use a formula to determine which cells to format.

3
Enter the leave formula

Enter =SUMPRODUCT(($A3=$A$12:$A$19)*(B$2>=$B$12:$B$19)*(B$2<=$C$12:$C$19))>0 in the formula box.

4
Choose a fill color

Select Format, choose a color on the Fill tab, and click OK to save the format and rule.

5
Check the applied range

Open Home > Conditional Formatting > Manage Rules and confirm that Applies to is =$B$3:$AP$6.

Use a SUMPRODUCT conditional formatting rule
Adjust ranges for your sheet: If your layout differs, change the references to match your dashboard and leave table. Keep the employee, start-date, and end-date ranges the same size, and base the formula on the top-left cell of the selected dashboard range.
Work with leave dashboards in WPS

Highlight annual leave dates in WPS Spreadsheet

Use a SUMPRODUCT conditional formatting rule in WPS Spreadsheet to highlight dates covered by each employee's leave records.

  1. 1. Open the dashboard: Open your workbook in WPS Spreadsheet and select B3:AP6, with B3 as the active cell.
  2. 2. Add a formatting rule: Go to Home > Conditional Formatting > New Rule and choose the option to use a formula to determine which cells to format.
  3. 3. Enter the formula: In the formula box, enter =SUMPRODUCT(($A3=$A$12:$A$19)*(B$2>=$B$12:$B$19)*(B$2<=$C$12:$C$19))>0.
  4. 4. Set the highlight: Choose a fill color in Format, confirm the rule, and check that it applies to B3:AP6.
Highlight multiple leave ranges for the same employeeOpen and edit Microsoft Excel XLSX filesUse familiar spreadsheet formulas and conditional formattingWork with a free, easy-to-use office suite
microsoft office alternative - wps office

Frequently Asked Questions

Does the formula include the first and last day of leave?

Yes. The >= start-date and <= end-date comparisons include both dates in the highlighted range.

Can the rule handle multiple leave bookings for one employee?

Yes. SUMPRODUCT checks every row in A12:C19 and highlights a dashboard cell if at least one matching leave range contains its date.

Why is a booked date not highlighted?

Check that the employee name matches the leave table and that the dashboard date and leave dates are actual date values. Then open Home > Conditional Formatting > Manage Rules and verify the formula and Applies to range.

How do I include more leave records?

Open Home > Conditional Formatting > Manage Rules, edit the formula, and extend all three leave-table ranges to the same last row. For example, change A12:A19, B12:B19, and C12:C19 to end at row 50.