What is the Excel WEEKDAY Function?
Excel WEEKDAY function returns an integer number between 1-7 representing the day of the week corresponding to a date. By default, WEEKDAY function returns 1 for Sunday and 7 for Saturday.
Usually, the WEEKDAY function is used in other excel formulas to check the day of the week and use the results.
WEEKDAY Syntax
WEEKDAY(serial_number,[return_type])
serial_number, the date for which you are trying to find the day of the week.
return_type, optional, a number that determines the day of the week mapping scheme (see the image below)
Note:
- The serial_number argument must use the date from January 1, 1900, to December 31, 9999 if outside the range return a #VALUE! error.
How to Use WEEKDAY Function in Excel
The image below is an example of using the WEEKDAY function for several dates
WEEKDAY Function #1
=WEEKDAY(A2)
July 4, 1776, is American Independence Day. Excel only handle dates from January 1, 1900, to December 31, 9999. That’s why the WEEKDAY function returns a #VALUE! error. By default, Excel unable to know what day American Independence Day happens.
WEEKDAY Function #2
=WEEKDAY(A3)
The WEEKDAY function returns 2, meaning that on Monday America dropped a “Little Boy” an atomic bomb on Hiroshima.
WEEKDAY Function #3
=WEEKDAY(A4)
The WEEKDAY function returns 1.
Neil Armstrong stepped into history by leaving the first human footprint on the moon surface; this happened on Sunday. July 20, 1969, is the date Apollo 11 landed on the moon.
WEEKDAY Function #4
=WEEKDAY(A5)
The WEEKDAY function returns 6.
Richard Nixon resigned on Friday, making him the only president to resign from the position.
WEEKDAY Function #5
=WEEKDAY(A6)
The WEEKDAY function returns 5.
Bill Gates introduced Windows 95 on Thursday. Windows 95 was Microsoft’s first graphical user interface operating system.
WEEKDAY Function #6
=WEEKDAY(A7)
The WEEKDAY function returns 3.
Elon Musk founded TESLA on Tuesday
WEEKDAY Function #7
=WEEKDAY(A8)
The WEEKDAY function returns 4.
Facebook acquired Whatsapp on Wednesday.
The WEEKDAY function only returns a number instead of day names, to returns the day names you can use the excel TEXT function or you can use the excel CHOOSE function for more flexible day names.