< Go Back

Get week number from date

★ 20 minute read

In this tutorial, you will learn how to get week number from date. This is possible by using Excel WEEKNUM function. Also, you will get familiar with three different ways to get week number from a date, depending on starting week definition. Based on the selected type of calculating the week number, the function will set the first week of a year.

Get week number from a date

Formula

=WEEKNUM(date, [return_type])

Explanation

The function WEEKNUM returns a week number of a selected date. The parameters of the function are date – a date for which we want to calculate week number in a year; return_type – a non-mandatory parameter, which tells the function how to calculate weeks in a year. The possible values are:

1 – the first week of a year begins on January 1, while the second week begins on the next Sunday;

2 – the first week of a year begins on January 1, while the second week begins on the next Monday;

21 – ISO week numbers: the first week begins on the first Monday between December 29 and January 4.

If this parameter is omitted, the WEEKNUM function will by default set it to 1 when we want to get week number from date.

Example 1

In the example we will see how to get week number from date:

=WEEKNUM(B3)

 

 

Figure 1. Get week number from a date

 

The dates for which we want to calculate week number are in column B (“Date”) and also the week number will be in column C (“Week number”). For the date in B3 (24-Feb-18) the function returned to 8 in cell C3 because the selected date is in the 8th week of the 2018 year.

Also, if we wanted to use return type parameter and define the type of calculating weeks, we could have set it in the function. For example, the function to get week number from a date with ISO weeks would look like:

=WEEKNUM(B3, 21)

Our customers love us!
“The expert was absolutely amazing and stuck with me the whole way through. They were polite, patient, seemed to want to genuinely help me and provided a solution that I would never have managed otherwise. I could not be more thankful for their support and solution. Thank you!” - - Chris T, in California
This blog is one way to figure it out. A 20 minute chat session with an expert is a better way.Get step-by-step guidance on your question

Leave a Comment

avatar