Excel Now

The Excel WEEKDAY function takes a date and returns a number between 1-7 representing the day of week. By default, WEEKDAY returns 1 for Sunday and 7 for Saturday, but this is configurable. You can use the WEEKDAY function inside other formulas to check the day of week.

Purpose:  Get the day of the week as a number  
Return value:  A number between 0 and 7.  
Syntax:  =WEEKDAY (serial_number, [return_type])

Examples:

By default and without a value for return_type, WEEKDAY starts counting on Sunday:
=WEEKDAY("3-Jan-21") // Sunday, returns 1
=WEEKDAY("4-Jan-21") // Monday, returns 2  
To configure WEEKDAY to start on Monday, set return_type to 2:
=WEEKDAY("3-Jan-21",2) // Sunday, returns 7
=WEEKDAY("4-Jan-21",2) // Monday, returns 1  

In the example shown above, the formula in D5 (copied down) is:
=WEEKDAY(B5) // Sunday start The formula in E5 (copied down) is:
=WEEKDAY(B5,2) // Monday start    
By default, WEEKDAY returns 1 for Sunday and 7 for Saturday.
WEEKDAY returns a value (7) even if the date is empty.

Related Posts

Leave a Reply