I made an interesting discovery about the WEEKDAY function over the weekend.
The WEEKDAY function converts a date in Excel into a number between 1-7 which represents the day of week.
=WEEKDAY(serial_number, [return_type])
serial_number - This is the date that you want to convert
return_type - This determines the logic applied to the date. See the table below:
As I was working through the options in the return_type argument I spotted that two of the options are duplicated: 1 & 17 and 2 & 11 are the same.
That made me pause for a moment, its not something I have seen before in a function in Excel (at least I don't think I have).
Now, it turns out that the reason for this is backward compatibility when Microsoft expanded the options from the original set of three (which they had to retain) to a further seven back in 2010.