Date and Time - WEEKNUM Function



Description

The WEEKNUM function returns the week number of a specific date. The number represents where the week falls numerically within a year.

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])

Arguments

Argument Description Required/ Optional
Serial_number

A date within the week.

Dates should be entered by using the DATE function, or as results of other formulas or functions.

Problems can occur if dates are entered as text.

Required
Return_type

A number that determines on which day the week begins.

The default is 1.

Look at the Week_beginning Day Table given below.

Optional

Week_beginning Day Table

Return_type Week begins on System
1 or omitted Sunday 1
2 Monday 1
11 Monday 1
12 Tuesday 1
13 Wednesday 1
14 Thursday 1
15 Friday 1
16 Saturday 1
17 Sunday 1
21 Monday 2

Notes

  • 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, WEEKNUM returns #NUM! error value.

  • If Return_type is out of the range specified in the table above, WEEKNUM returns #NUM! error value.

  • If Serial_number cannot be recognized as a numeric value or a date, WEEKNUM returns #NUM! error value.

Applicability

Excel 2007, Excel 2010, Excel 2013, Excel 2016

Example

WEEKNUM Function
advanced_excel_date_time_functions.htm
Advertisements