Excel Day Of Week

Determining the day of the week from a date in Excel is a straightforward process. This article will guide you through various methods to extract the day of the week from a given date, catering to different needs and preferences. Whether you're a beginner or an advanced user, there's a method suited for you.
Methods to Get Day of the Week in Excel

Excel offers multiple functions and formulas to extract the day of the week from a date. Here are some of the most commonly used methods:
WEEKDAY Function
The WEEKDAY function is one of the most popular ways to get the day of the week in Excel. It returns an integer representing the day of the week, with 1 being Sunday and 7 being Saturday by default. You can customize the start day of the week using the optional return_type argument.
Here's the syntax:
=WEEKDAY(serial_number, [return_type])
Where serial_number is the date for which you want to find the day of the week, and return_type is an optional argument to specify the start day of the week. If omitted, it defaults to 1 (Sunday).
For example, if you have the date "2023-08-14" in cell A1, the formula =WEEKDAY(A1, 2)
will return 1, indicating Monday.
TEXT Function
The TEXT function can also be used to extract the day of the week from a date. It allows you to format the date as text, and you can specify the format to display the day of the week.
Here's the syntax:
=TEXT(value, format_text)
Where value is the date for which you want to find the day of the week, and format_text is the format you want to use. To get the day of the week, you can use the format "ddd" for abbreviated day names or "dddd" for full day names.
For example, if you have the date "2023-08-14" in cell A1, the formula =TEXT(A1, "dddd")
will return "Monday."
Custom Number Format
You can also use a custom number format to display the day of the week directly in a cell. This method is useful when you want to show the day of the week alongside the date in the same cell.
Here's how to apply a custom number format:
- Select the cells you want to format.
- Right-click and choose Format Cells or press Ctrl + 1 on your keyboard.
- In the Format Cells dialog box, go to the Number tab.
- Choose Custom from the Category list.
- In the Type box, enter the custom format code you want. For example,
"ddd"
for abbreviated day names or"dddd"
for full day names. - Click OK to apply the custom format.
For example, if you have the date "2023-08-14" in cell A1 and apply the custom format "dddd"
, the cell will display "Monday."
VBA Function
If you're comfortable with VBA (Visual Basic for Applications), you can create a custom function to get the day of the week. This method offers more flexibility and can be useful for specific needs.
Here's a simple VBA function to get the day of the week:
Function GetDayOfWeek(date As Date) As String
GetDayOfWeek = WeekdayName(Weekday(date, vbMonday))
End Function
To use this function, you need to insert it into a module in your Excel workbook. After inserting the function, you can use it like any other Excel function. For example, if you have the date "2023-08-14" in cell A1, the formula =GetDayOfWeek(A1)
will return "Monday."
Comparing Methods

Each method has its own advantages and use cases. Here's a comparison to help you choose the right method for your needs:
Method | Advantages | Use Cases |
---|---|---|
WEEKDAY Function | Simple and versatile. Allows customization of the start day of the week. | When you need a numeric representation of the day of the week or want to perform calculations based on the day. |
TEXT Function | Provides a text representation of the day of the week. Easy to use with other text functions. | When you want a text-based representation of the day of the week for display purposes. |
Custom Number Format | Allows you to display the day of the week directly in a cell alongside the date. | Useful for quick reference or when you want a concise display of the day of the week. |
VBA Function | Offers flexibility and customization. Can be tailored to specific needs. | When you require a more complex or customized solution, especially for advanced users. |

Tips and Best Practices

- Always ensure your date values are in a recognized date format to avoid errors.
- Use the WEEKDAY function with caution when working with international audiences, as the start day of the week can vary by region.
- The TEXT function is versatile and can be combined with other text functions for more complex formatting.
- Custom number formats are a quick and easy way to display the day of the week alongside the date.
- VBA functions offer advanced customization but require programming knowledge.
Conclusion

Excel provides multiple ways to extract the day of the week from a date, catering to various needs and skill levels. Whether you prefer a simple function, a text-based approach, a custom format, or a VBA solution, you can choose the method that best fits your requirements. By understanding these methods and their advantages, you can efficiently work with dates and days of the week in Excel.
How do I get the day of the week as a number in Excel?
+You can use the WEEKDAY function to get the day of the week as a number. The default return type is 1 for Sunday and 7 for Saturday. You can customize the start day of the week by specifying the return_type argument.
Can I display the day of the week as text in a cell?
+Yes, you can use the TEXT function or apply a custom number format to display the day of the week as text in a cell. This is useful for a text-based representation of the day.
How do I get the day of the week using VBA?
+You can create a custom VBA function to get the day of the week. The example function provided in this article uses the WeekdayName and Weekday functions to return the day of the week as a string.
What is the difference between the WEEKDAY and TEXT functions for getting the day of the week?
+The WEEKDAY function returns a number representing the day of the week, while the TEXT function returns a text representation. The WEEKDAY function is more suited for calculations, while the TEXT function is better for display purposes.