Week Number (WEEKNUM) is a date function in excel which gives us the week number for the given date in a date, it has two arguments in it one which takes a date as an argument which can be a date or a serial number and the other argument is optional which represents the day on which the week begins, the second argument is optional however the first argument is mandatory and the method to use this weeknum function is as follows =Weeknum(Serial Number, Return Type), if the return type is not provided it is considered one by default which Sunday.
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.
Example: Let’s look at some Excel WEEKNUM function examples and explore how to use the WEEKNUM function as a worksheet function in Microsoft Excel:
Based on the Excel spreadsheet above, the following WEEKNUM examples would return:
- By default start of the week in excel is SUNDAY.
- If you want to start with a different week then you need to supply the return type correctly.
- If the date is not in the correct format then we will get #VALUE! Error.