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 toB8 - 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"
$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.
A25/25/2026The value in A2.
COUNTIF($E$2:$E$7,A2)1COUNTIF: 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, … - criteria
A25/25/2026
- range
WEEKDAY(A2,2)1WEEKDAY: Day of the week as a number; Sunday = 1 by default.- serial_number
A25/25/2026 - return_type
2
- serial_number
WEEKDAY(A2,2)>5FALSEThe > operator tests greater than.
IF(WEEKDAY(A2,2)>5,"Weekend","Workday")"Workday"not usedIF: Returns one value if a test is true, another if false.- logical_test
WEEKDAY(A2,2)>5FALSE - value_if_true
"Weekend"not used - value_if_false
"Workday"
- logical_test
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_test
COUNTIF($E$2:$E$7,A2)1 - value_if_true
"Holiday" - value_if_false
IF(WEEKDAY(A2,2)>5,"Weekend","Workday")"Workday"not used
- logical_test
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.
| Formula | Result | When 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 result | One 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
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.