The simplest Excel formula to check if a date is a weekday is =IF(WEEKDAY(A2,2)<6,"Weekday","Weekend"), where A2 contains the date. This returns “Weekday” for Monday through Friday and “Weekend” for Saturday and Sunday, using the WEEKDAY function with return type 2 (Monday=1 to Sunday=7).
How the WEEKDAY Function Works
The WEEKDAY function returns a number representing the day of the week for a given date. Its syntax is WEEKDAY(serial_number, [return_type]). The serial number is a date in Excel (either a cell reference or a date entered with DATE). The return_type argument controls which day is numbered 1. The most common return types are:
- 1 (default): Sunday=1, Monday=2, … Saturday=7.
- 2: Monday=1, Tuesday=2, … Sunday=7.
- 3: Monday=0, Tuesday=1, … Sunday=6.
For weekday checks, return type 2 is usually easiest because you can test <6 for weekdays (Mon–Fri) or >5 for weekends.
Using IF with WEEKDAY
The IF function lets you return custom text based on the weekday number. For example, with a date in A2:
=IF(WEEKDAY(A2,2)<6,"Workday","Rest day")
This returns “Workday” for Monday–Friday and “Rest day” for Saturday–Sunday. You can also nest conditions to return the actual day name, like =CHOOSE(WEEKDAY(A2,2),"Mon","Tue","Wed","Thu","Fri","Sat","Sun"), though Excel’s TEXT function is simpler: =TEXT(A2,"dddd") gives the full name (e.g., “Wednesday”).
Checking Weekday vs. Weekend with Other Functions
Beyond IF, you can combine WEEKDAY with other functions for more complex logic:
- Count weekdays in a range: Use
SUMPRODUCT(--(WEEKDAY(range,2)<6))to count all weekdays in a range of dates. - Highlight weekends: In conditional formatting, select the date range, go to Home > Conditional Formatting > New Rule > Use a formula, then enter
=WEEKDAY(A2,2)>5(adjust A2 to the first cell) and set a format. - Check if a date is a workday (excluding holidays): Use
WORKDAYorNETWORKDAYSfor business-day calculations, not WEEKDAY alone.
Common Mistakes and Misconceptions
A frequent error is forgetting the return_type. If you omit it, WEEKDAY uses 1 (Sunday=1), so testing <6 would incorrectly mark Saturday as a weekday (since Saturday=7, but Sunday=1, and Monday=2, etc.). Always specify ,2 to align with Monday–Friday workweeks.
Another misconception: WEEKDAY only works with dates, not text. If your cell contains text like “2025-03-15”, Excel may not recognize it as a date. Use DATEVALUE to convert text to a date first, or ensure the cell is formatted as a date.
Also, WEEKDAY does not account for holidays or regional workweeks (e.g., Sunday–Thursday in some countries). For those, you need WORKDAY or NETWORKDAYS with a holiday list.
Examples for Real Scenarios
Let’s say you have a list of delivery dates in A2:A10 and want to mark each as “Weekday” or “Weekend” in column B. In B2, enter:
=IF(WEEKDAY(A2,2)<6,"Weekday","Weekend")
Drag down to B10. If A2 contains 2025-03-15 (a Saturday), the formula returns “Weekend”. For 2025-03-17 (Monday), it returns “Weekday”.
To count how many weekends are in the range, use:
=SUMPRODUCT(--(WEEKDAY(A2:A10,2)>5))
This returns 2 if there are two Saturdays/Sundays in the range.
Alternatives to WEEKDAY
Excel offers other date functions that can serve similar purposes:
- TEXT:
=TEXT(A2,"ddd")returns a three-letter day abbreviation (e.g., “Sat”). You can then use IF with text, but WEEKDAY is more reliable for numeric comparisons. - CHOOSE:
=CHOOSE(WEEKDAY(A2,2),"Mon","Tue","Wed","Thu","Fri","Sat","Sun")gives full names but requires a long list. - NETWORKDAYS: Counts workdays between two dates, automatically excluding weekends (and optional holidays). For example,
=NETWORKDAYS(A2,B2)returns the number of weekdays.
For most weekday checks, WEEKDAY with IF is the most direct and readable solution.
Frequently Asked Questions
How do I check if a date is a weekday in Excel?
Use =IF(WEEKDAY(A2,2)<6,"Weekday","Weekend"). Replace A2 with your date cell. The formula returns “Weekday” for Monday–Friday and “Weekend” for Saturday–Sunday.
What does WEEKDAY return for Saturday and Sunday?
With return type 2, Saturday returns 6 and Sunday returns 7. With the default return type (1), Saturday returns 7 and Sunday returns 1, which can be confusing—always specify return type 2 for a Monday-based week.
Can I highlight weekends in a column?
Yes. Select the date range, go to Home > Conditional Formatting > New Rule > Use a formula. Enter =WEEKDAY(A2,2)>5 (adjust A2 to the top-left cell of your selection), choose a format, and click OK. This will highlight all Saturdays and Sundays.
Why does my formula return the wrong result?
Most likely because you omitted the return type. Without ,2, WEEKDAY treats Sunday as 1, so <6 would mark Sunday as a weekday and Saturday as a weekend—but your week might start on Monday. Also check that your cell contains a real date, not text.
Does WEEKDAY work in Google Sheets?
Yes, Google Sheets has the same WEEKDAY function with identical syntax. The conditional formatting path is slightly different: Format > Conditional formatting > Custom formula is, then enter the same formula.
How do I count weekdays between two dates?
Use the NETWORKDAYS function: =NETWORKDAYS(start_date, end_date). This counts all days from start to end, excluding Saturdays and Sundays. To exclude holidays, add a third argument with a range of holiday dates.
Related
- Data Entry and Data Management: Clear Answers
- Google Sheets Percentage of Total: Easy Formula
- Java String Length: How to Get String Length
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel LEN Function: Count Text Length and SpacesIn Microsoft Excel, the LEN function gives the length of a text string by counting its characters. For…
- LAMBDA in Excel: A Practical Guide to Custom FunctionsYes—Excel’s LAMBDA function lets you create reusable custom functions without writing VBA. For a quick test, with no…
- Min Max Formula in Excel: How to Use MIN and MAXThe MIN and MAX formulas in Excel are =MIN(range) and =MAX(range), which return the smallest and largest numbers…
- Sort Excel Spreadsheet by Date: A Clear GuideTo sort an Excel spreadsheet by date, click a date cell and choose Data > Sort Oldest to…
- Excel Sum Unique Values: Formula Rules and ExamplesTo add each different numeric value once in Excel, put the values in B2:B8 and enter =SUM(UNIQUE(B2:B8)). The…
- Balance of Trade Formula: Definition & CalculationThe balance of trade formula is Exports − Imports. A positive result is a trade surplus, a negative…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.