Function Problems

Display a Holiday Check Mark Using Dates in Excel

Steve KSteve K Nov 18, 2026 868 views

Question details

Display a check mark when a date is in a holiday table and values exist for the preceding and following dates.

Display a Holiday Check Mark Using Dates in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains dates and associated values, while a second sheet lists holiday dates.
Observed behavior
The desired result is a check mark only when the worksheet date matches a holiday and both adjacent calendar dates have nonblank values.
Before you start

Check that Sheet1 column B and Sheet2 D3:D11 contain real Excel dates from the intended year, without time components. This example checks values in Sheet1 column C and uses E5 for the result; adjust the references to match your workbook.

Solution 1Recommended

Use COUNTIF and COUNTIFS to display the holiday check mark

Use a formula to test the holiday date and check for nonblank values on both adjacent calendar dates.

1
Enter the formula

On Sheet1, select E5 and enter =IF(AND(ISNUMBER($B5),COUNTIF(Sheet2!$D$3:$D$11,$B5)>0,COUNTIFS($B:$B,$B5-1,$C:$C,"<>")>0,COUNTIFS($B:$B,$B5+1,$C:$C,"<>")>0),"✓","").

2
Apply it to other dates

Drag the fill handle from E5 down column E. Each row checks its date in column B against the holiday list and looks for nonblank column C values on the previous and next dates.

3
Highlight check marks

Select E5:E100, then choose Home > Conditional Formatting > New Rule. Choose a formula-based rule, enter =$E5="✓", and select a font or fill color.

Use COUNTIF and COUNTIFS to display the holiday check mark
Calendar dates and values: The formula checks the immediately preceding and following calendar dates, not the previous and next working days. Any nonblank value in column C qualifies; if multiple rows share a date, at least one must have a value.
Work with holiday dates in WPS

Create the holiday check mark in WPS Spreadsheets

Use COUNTIF and COUNTIFS in WPS Spreadsheets to check the holiday list and adjacent-day values, then highlight the resulting check marks.

  1. 1. Open the workbook: Open the Excel workbook in WPS Spreadsheets and locate the dates and values on Sheet1 and the holiday list on Sheet2.
  2. 2. Enter the check formula: Select Sheet1 cell E5 and enter =IF(AND(ISNUMBER($B5),COUNTIF(Sheet2!$D$3:$D$11,$B5)>0,COUNTIFS($B:$B,$B5-1,$C:$C,"<>")>0,COUNTIFS($B:$B,$B5+1,$C:$C,"<>")>0),"✓",""). Adjust the references if your data is elsewhere.
  3. 3. Fill the formula down: Drag E5's fill handle down alongside the dates you want to check.
  4. 4. Format the results: Select the result cells and use Home > Conditional Formatting to create a formula rule such as =$E5="✓" and choose a highlight color.
Check holiday dates and adjacent-day values with a single formulaOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface with conditional formattingGet started with the free WPS Office suite
QA img-9

Frequently Asked Questions

Why does a holiday date not produce a check mark?

Check that the date appears in Sheet2 D3:D11 and that Sheet1 column C has a nonblank value for both the previous and next calendar dates. Also verify that the dates are real dates from the same year and contain no time components.

Can I check for a specific value instead of any nonblank value?

Yes. In each COUNTIFS expression, replace the criterion "<>" with the value to match, such as "Approved", or with a reference to a cell containing that value.

Does the formula check working days or calendar days?

It checks calendar days by subtracting and adding 1 to the date in B5. Weekends and holidays are not skipped.

Can conditional formatting add the check mark by itself?

The conditional formatting rule in this example highlights an existing check mark; the formula in column E produces the mark. Select the result cells and use Home > Conditional Formatting to apply the highlight.