Spreadsheet Practice

How to check if a date is a holiday in Excel

Formula (Excel and Google Sheets)

=IF(COUNTIF($E$2:$E$7,A2),"Holiday",IF(WEEKDAY(A2,2)>5,"Weekend","Workday"))

Count the date in the holiday list: =IF(COUNTIF(holidays,A2),"Holiday",IF(WEEKDAY(A2,2)>5,"Weekend","Workday")).

Result on the example
one result per row in B2, filled down to B8
Works in
Every current version
Google Sheets
Same formula

See it work

The formula is already in B2, filled down to B8. Change any input and the result updates, or edit the formula to experiment.

How it works

COUNTIF counts how many times the date appears in the holiday list, and any count above 0 counts as TRUE. Dates that aren't holidays go on to the weekend test, where WEEKDAY with type 2 gives 6 and 7 for Saturday and Sunday.

=IF(COUNTIF($E$2:$E$7,A2),"Holiday",IF(WEEKDAY(A2,2)>5,"Weekend","Workday"))

Result"Holiday"

  1. $E$2:$E$76 rows × 1 col: 1/1/2026, 5/25/2026, 7/3/2026, 9/7/2026, …

    A range: 6 cells in one column.

  2. A25/25/2026

    The value in A2.

  3. COUNTIF($E$2:$E$7,A2)1

    COUNTIF: Counts cells that meet one condition.

    • range$E$2:$E$76 rows × 1 col: 1/1/2026, 5/25/2026, 7/3/2026, 9/7/2026, …
    • criteriaA25/25/2026
  4. WEEKDAY(A2,2)1

    WEEKDAY: Day of the week as a number; Sunday = 1 by default.

    • serial_numberA25/25/2026
    • return_type2
  5. WEEKDAY(A2,2)>5FALSE

    The > operator tests greater than.

  6. IF(WEEKDAY(A2,2)>5,"Weekend","Workday")"Workday"not used

    IF: Returns one value if a test is true, another if false.

    • logical_testWEEKDAY(A2,2)>5FALSE
    • value_if_true"Weekend"not used
    • value_if_false"Workday"
  7. IF(COUNTIF($E$2:$E$7,A2),"Holiday",IF(WEEKDAY(A2,2)>5,"Weekend","Workday"))"Holiday"

    IF: Returns one value if a test is true, another if false.

    • logical_testCOUNTIF($E$2:$E$7,A2)1
    • value_if_true"Holiday"
    • value_if_falseIF(WEEKDAY(A2,2)>5,"Weekend","Workday")"Workday"not used

In Google Sheets

The same formula works in Google Sheets: =IF(COUNTIF($E$2:$E$7,A2),"Holiday",IF(WEEKDAY(A2,2)>5,"Weekend","Workday")). We ran it in Google Sheets mode on the same data and it returns the same results.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=IF(ISNUMBER(MATCH(A2,$E$2:$E$7,0)),"Holiday",IF(WEEKDAY(A2,2)>5,"Weekend","Workday"))Holiday, Workday, Holiday…MATCH instead of COUNTIF; the same result.
=IF(NETWORKDAYS(A2,A2,$E$2:$E$7),"Workday","Day off")Day off, Workday, Day off…Different resultOne test for weekends and holidays together. Doesn't say which kind of day off.

Common mistakes

  • A holiday list typed as text never matches real dates. Real dates are right-aligned.
  • Dates with times don't match the plain holiday dates. Compare INT(A2).

Try it yourself

Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.

Check if a date is a holiday

In B2, show "Holiday" if the date is in the list in E2:E7, otherwise "Weekend" or "Workday". Fill down to B8.

Questions

How do I return the holiday's name?

=XLOOKUP(A2,$E$2:$E$7,$D$2:$D$7,"").

How do I skip holidays when adding days?

Pass the list to WORKDAY: =WORKDAY(A2,5,$E$2:$E$7).

Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.