To get the weekday from a date in Excel, use the =WEEKDAY(date) function, which returns a number (1 for Sunday through 7 for Saturday), or combine it with TEXT to get the name, like =TEXT(A2,"dddd"). For example, if cell A2 contains 2024-05-15, =WEEKDAY(A2) returns 4 (Wednesday) and =TEXT(A2,"dddd") returns “Wednesday”.
Why the Weekday Function Returns Numbers
Excel stores dates as serial numbers, where 1 equals January 1, 1900, and each day increments by 1. The WEEKDAY function converts that serial number into a day-of-week index. By default, it uses the return_type argument of 1, meaning Sunday = 1, Monday = 2, and so on up to Saturday = 7. This default matches the American convention where the week starts on Sunday.
If you prefer the week to start on Monday (common in Europe and ISO standards), use =WEEKDAY(date, 2), where Monday = 1 and Sunday = 7. There are also return types 3 (Monday = 0 through Sunday = 6) and 11-17 for different starting days. The syntax is =WEEKDAY(serial_number, [return_type]).
How to Get the Weekday Name (e.g., “Monday”)
To display the actual name instead of a number, use the TEXT function with a format code. The two most common codes are:
=TEXT(A2,"dddd")– returns the full day name (e.g., “Monday”)=TEXT(A2,"ddd")– returns the abbreviated name (e.g., “Mon”)
For example, with the date 2024-05-15 in A2, =TEXT(A2,"dddd") gives “Wednesday”. The TEXT function works in any Excel version, including Excel for the web, but note that the result is text, not a date. If you later need to perform calculations on the weekday, keep the original date in a separate column.
Using WEEKDAY in Conditional Formatting and Formulas
You can combine WEEKDAY with other functions to highlight weekends or filter data. For instance, to flag Saturdays and Sundays in a column of dates (say A2:A100), use Conditional Formatting with a formula rule:
- Select the range A2:A100.
- Go to Home > Conditional Formatting > New Rule.
- Choose “Use a formula to determine which cells to format”.
- Enter
=OR(WEEKDAY(A2)=1, WEEKDAY(A2)=7)(assuming default return type). - Set a fill color and click OK.
In a formula, you might want to count weekdays in a date range. For example, with start date in B1 and end date in B2, the number of Mondays is =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(B1&":"&B2)))=2)). This works in Excel 365, but for simpler counting, use NETWORKDAYS to count working days (excluding weekends and optionally holidays).
Alternative: The TEXT Function vs. Custom Number Formatting
If you don’t need the weekday in a formula and just want to display it, you can apply a custom number format to the date cell. Right-click the cell, choose Format Cells (Ctrl+1), go to the Number tab, select Custom, and type dddd in the Type box. This changes the display to the full day name without altering the underlying date value. The advantage over TEXT is that the cell remains a true date, so you can still sort or calculate with it. The downside is that you can’t easily extract the name into a separate column for filtering.
For a separate column that contains the name as text, the TEXT function is the straightforward choice. If you need the name in another language, use =TEXT(A2,"[$-es-ES]dddd") for Spanish, for example, but this requires the language pack to be installed.
Common Mistakes and How to Avoid Them
One frequent error is forgetting that WEEKDAY returns a number, not a name. If you compare it to text like “Monday”, you’ll get a FALSE. Another issue is using the wrong return type when your week starts on a different day. For instance, if you use =WEEKDAY(A2,2) and then check for Sunday (which is 7), but your data uses the default, you’ll misidentify days.
Also, be careful with dates stored as text. If a cell contains “2024-05-15” as text (often due to importing data), WEEKDAY will return a #VALUE! error. To fix, convert the text to a real date using =DATEVALUE(A2) or by using the Text to Columns wizard (Data > Text to Columns > Delimited > Next > Date > MDY).
Another pitfall: when using TEXT with a date that has a time component, the time is ignored, but if the date is actually a serial number with a fraction, it still works fine. Finally, remember that WEEKDAY is volatile? No, it’s not volatile—it recalculates only when the source date changes.
Comparing WEEKDAY, TEXT, and CHOOSE
You might see examples using =CHOOSE(WEEKDAY(A2),"Sun","Mon",...) to get a name. This works but is more verbose than TEXT. The CHOOSE approach gives you full control over the names (e.g., abbreviations in your own language), but it requires you to list all seven names. For example, =CHOOSE(WEEKDAY(A2),"Sun","Mon","Tue","Wed","Thu","Fri","Sat") returns “Wed” for a Wednesday. This is useful when you want custom labels, but for standard names, TEXT is simpler.
In terms of performance, WEEKDAY is a fast, lightweight function. TEXT can be slower if used on thousands of cells because it converts to text, but for typical spreadsheets, the difference is negligible. For large datasets, consider using WEEKDAY in a helper column and then using a lookup table for names, which is faster than TEXT.
Frequently Asked Questions
How do I get the weekday as a number starting with Monday?
Use =WEEKDAY(A2, 2). This returns 1 for Monday, 2 for Tuesday, up to 7 for Sunday.
Can I get the weekday name in a different language?
Yes, use the TEXT function with a locale code, like =TEXT(A2,"[$-fr-FR]dddd") for French. This works if your Excel has the language pack installed.
Why does my WEEKDAY formula return #VALUE!?
Most likely the cell contains text that looks like a date. Convert it using =DATEVALUE(A2) or use the Text to Columns feature to change it to a real date.
How do I count the number of a specific weekday between two dates?
Use =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(B1&":"&B2)))=2)) for Mondays (where 2 is Monday with return type 2). Adjust the number for other weekdays.
Does WEEKDAY work in Google Sheets?
Yes, the WEEKDAY function works the same way. In Google Sheets, you can also use =TEXT(A2,"dddd") to get the name. The syntax and return types are identical.
Is there a way to get the weekday without a formula?
Yes, you can use a custom number format. Select the cell, press Ctrl+1, go to Number > Custom, and type dddd to display the full day name, or ddd for the abbreviation. This changes only the display, not the value.
Related
- How to Calculate Center of Balance
- Google Sheets WEEKNUM Function: Syntax & Examples
- Google Sheets Split Cell Into Rows: How-To
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Change the Outlook View to Show Sender NamesTo show who sent each email in Outlook for Windows classic, open the folder, choose View > Change…
- Excel Remove Duplicates: Why No Duplicates Are Found and What to CheckIf Excel’s Remove Duplicates command reports that no duplicates were found, it means no two rows matched across…
- Checkbox in Google Sheets: Add and Use ItTo add a checkbox in Google Sheets, select the cell or range, then choose Insert > Checkbox. Click…
- Excel Heat Map Color Codes: How to Choose and ApplyExcel has no single set of required heat map color codes: a heat map is usually a Conditional…
- Power Query Keep Duplicates: How the Command WorksYes. Power Query’s Keep Duplicates command keeps every row whose value—or combination of values—in the selected columns occurs…
- Excel Print Header on Each Page: Repeat Rows in PrintTo print a worksheet’s column headings on every page in Excel for Microsoft 365 on Windows, go to…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.