WEEKNUM function

This article describes the formula syntax and usage of the WEEKNUM function in Microsoft Excel.

Description

Returns the week number of a specific date. For example, the week containing January 1 is the first week of the year, and is numbered week 1.

There are two systems used for this function:

  • System 1    The week containing January 1 is the first week of the year, and is numbered week 1.
  • System 2    The week containing the first Thursday of the year is the first week of the year, and is numbered as week 1. This system is the methodology specified in ISO 8601, which is commonly known as the European week numbering system.

Syntax

WEEKNUM(serial_number,[return_type])

The WEEKNUM function syntax has the following arguments:

  • Serial_number     Required. A date within the week. Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
  • Return_type     Optional. A number that determines on which day the week begins. The default is 1.
Return_typeWeek begins onSystem
1 or omittedSunday1
2Monday1
11Monday1
12Tuesday1
13Wednesday1
14Thursday1
15Friday1
16Saturday1
17Sunday1
21Monday2

Remark

  • Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1. January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900.
  • If Serial_number is out of range for the current date base value, a #NUM! error is returned.
  • If Return_type is out of the range specified in the table above, a #NUM! error is returned.

Example

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.

Data
3/9/2012
FormulaDescriptionResult
=WEEKNUM(A2)Number of the week in the year that 3/9/2012 occurs, based on weeks beginning on Sunday (default).10
=WEEKNUM(A2,2)Number of the week in the year that 3/9/2012 occurs, based on a week beginning on Monday (the second argument, 2).11

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top