What is WEEKNUM function in Excel?
The WEEKNUM function is one of the Date & Time functions of Excel.
It Returns the week number in the year.
We can find this function in Date & Time category of insert function Tab.
How to use WEEKNUM function in excel
- Click on an empty cell (like F5).

2. Click on the fx icon (or press shift+F3).

3. In the insert function tab you will see all functions.

4. Select Date & Time category.
5. Select WEEKNUM function
6. Then select ok.

7. In the function arguments Tab you will see WEEKNUM function.
8. Serial number is the date-time code used by Microsoft Excel for date and time calculation.
9. Return_type is a number (1 or 2) that determines the type of the return value.
10. You will see the result in the formula result section.

Examples of WEEKNUM function in excel
example 1:
How to get week number from date in Excel?
In the following example, as you can see in the below photo, we get the week number from date by the WEEKNUM function.

=WEEKNUM(9/18/2022,1) ----->>>>answer is 39
=WEEKNUM(10/19/2022,2) ----->>>>answer is 43
=WEEKNUM(11/20/2022,1) ----->>>>answer is 48
=WEEKNUM(12/21/2022,2) ----->>>>answer is 52
=WEEKNUM(8/22/2022,1) ----->>>>answer is 35
Purpose of WEEKNUM function
It Returns the week number in the year.
Return value of WEEKNUM function
It returns a positive number.
Arguments of WEEKNUM function
This function has 2 Arguments.
Serial number is the date-time code used by Microsoft Excel for date and time calculation.
Return_type is a number (1 or 2) that determines the type of the return value.
Serial number argument of WEEKNUM function is number.
The Return_type argument of WEEKNUM function is number.
The Serial number argument of WEEKNUM function is required and not optional.
The Return_type argument of WEEKNUM function is not required and is optional.
Which version of excel supports WEEKNUM function?
This function is available for all excel versions (2003-2019)
Errors in WEEKNUM function
WEEKNUM related functions
- Use WEEKDAY function to return a number from 1 to 7 identifying the day of the week of a date.
- Use ISOWEEKNUM function to return the ISO week number in the year for a given date.