Excel: Week Number Function

Following my post on showing week numbers in Microsoft Outlook calendars, a couple of people e-mailed me questions about how to access week numbers in Microsoft Excel.

The function to use in order to get the week number for a given date is WEEKNUM. For example, if cell A1 contains the date “10/19/2011”, the following formula would return “43”, indicating that it is the 43rd week of the year:

=WEEKNUM(A1)

There is an additional optional parameter, “return type”, which is used to specify the day of the week that marks the beginning of a week. For example, use “12” if you’d like the weeks to start on Tuesdays:

=WEEKNUM(A1,12)

The following is a list of the various return types and their corresponding days. You’ll notice there are some duplicates – they aren’t typos, I assure you!

1: Sunday
2: Monday
11: Monday
12: Tuesday
13: Wednesday
14: Thursday
15: Friday
16: Saturday
17: Sunday
21: Monday

0 comments:

Post a Comment