1. Weekday Error

Can anybody please tell me why this formula give Wednesday instead of Friday

2. 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

3. Originally Posted by Maudibe
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

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

5. Originally Posted by Maudibe

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