Can anybody please tell me why this formula give Wednesday instead of Friday
thanks in advance
Braddy60
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Weekday Error
Can anybody please tell me why this formula give Wednesday instead of Friday
thanks in advance
Braddy60
weekday(E4) returns 4 as 10/19/2016 is a Wednesday which is day 4 of the week. The fourth choice in your formula is Wednesday and therefore the value returned. Your did not specify the return type so it defaults to Sunday as day 1
HTH,
Maud
Hi thanks for your reply could you elaborate a bit on the meaning of return type please
Thanks
Braddy60
Braddy,
The syntax for the weekday formula is: WEEKDAY(serial_number,[return_type])
In your example your formula was =Weekday(E4). Your formula could have been WEEKDAY(E4,2). The return type of 2 would indicate that the return value starts with Monday whereas a 1 or omitted return type, the return value starts on a Sunday (see the table below)
Return_type Optional. A number that determines the type of return value.
Return_type Number returned
1 or omitted= Numbers 1 (Sunday) through 7 (Saturday). Behaves like previous versions of Microsoft Excel.
2= Numbers 1 (Monday) through 7 (Sunday).
3= Numbers 0 (Monday) through 6 (Sunday).
11= Numbers 1 (Monday) through 7 (Sunday).
12= Numbers 1 (Tuesday) through 7 (Monday).
13= Numbers 1 (Wednesday) through 7 (Tuesday).
14= Numbers 1 (Thursday) through 7 (Wednesday).
15= Numbers 1 (Friday) through 7 (Thursday).
16= Numbers 1 (Saturday) through 7 (Friday).
17= Numbers 1 (Sunday) through 7 (Saturday).
Example: E4=10/17/2016 is a Monday
=Weekday(E4,1) or just Weekday(E4) returns a 2 because Monday is the second day starting from Sunday
=Weekday(E4,2) returns a 1 because the return type of 2 specifies that Monday is the first day of the weekdays
Essentially, it is setting the starting point and returning the number of weekdays from that point.
HTH,
Maud
Braddy,
The syntax for the weekday formula is: WEEKDAY(serial_number,[return_type])
In your example your formula was =Weekday(E4). Your formula could have been WEEKDAY(E4,2). The return type of 2 would indicate that the return value starts with Monday whereas a 1 or omitted return type, the return value starts on a Sunday (see the table below)
Return_type Optional. A number that determines the type of return value.
Return_type Number returned
1 or omitted= Numbers 1 (Sunday) through 7 (Saturday). Behaves like previous versions of Microsoft Excel.
2= Numbers 1 (Monday) through 7 (Sunday).
3= Numbers 0 (Monday) through 6 (Sunday).
11= Numbers 1 (Monday) through 7 (Sunday).
12= Numbers 1 (Tuesday) through 7 (Monday).
13= Numbers 1 (Wednesday) through 7 (Tuesday).
14= Numbers 1 (Thursday) through 7 (Wednesday).
15= Numbers 1 (Friday) through 7 (Thursday).
16= Numbers 1 (Saturday) through 7 (Friday).
17= Numbers 1 (Sunday) through 7 (Saturday).Example: E4=10/17/2016 is a Monday
=Weekday(E4,1) or just Weekday(E4) returns a 2 because Monday is the second day starting from Sunday
=Weekday(E4,2) returns a 1 because the return type of 2 specifies that Monday is the first day of the weekdays
Essentially, it is setting the starting point and returning the number of weekdays from that point.
HTH,
Maud
Thanks very much for your reply its much appreciated
Braddy60
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.
Notifications