2. WEEKNUM ( [, ] ) A date in datetime format.

A date within the week.

The Excel WEEKNUM function takes a date and returns a week number (1-54) that corresponds to the week of year. The With a return_type of 1-17, week number 1 in a given year is assigned to the week that contains January 1. This thread is locked. If you put in the value 21 (hmmm, ok, why not ) for the second parameter, the WEEKNUM function will return the same result as the function ISOWEEKNUM does in Excel 2013 and later versions. =WEEKNUM (Date,21) Tags: DATE, ISOWEEKNUM, WEEKNUM. WEEKNUM(serial_number,[return_type]) The WEEKNUM function syntax has the following arguments: Serial_number Required. 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!

如果 Return_type 超出了上表中指定的范围,则 #NUM! 返回错误。 示例. =WEEKNUM(serial_number,[return_type]) The WEEKNUM uses the following arguments: 1. 复制下表中的示例数据,然后将其粘贴进新的 Excel 工作表的 A1 单元格中。 要使公式显示结果,请选中它们,按 F2,然后按 Enter。 如果需要,可调整列宽以查看所有数据。 By default, weeks begin on Sunday. Saw in a blog that the function WEEKNUM in Excel 2010 would contain a return type 21 to deal with this - anyone know whether this is going to be available? With a return_type of 1-17, week number 1 in a given year is assigned to the week that contains January 1. How...To get the week number from the day from a date, you can use the WEEKNUM function. You must have JavaScript enabled to use this form. Serial_number (required argument) – This is an Excel date for which we want to return the week number. You can follow the question or vote as helpful, but you cannot reply to this thread. With return_type 21, week 1 is the week containing the first Thursday of the year, following ISO 8601.

More details in Remarks section.
=WEEKNUM(B5) The WEEKNUM function starts counting with the week that contains January 1. If you need to, you can adjust the column widths to see all the data.Number of the week in the year that 3/9/2012 occurs, based on weeks beginning on Sunday (default).Number of the week in the year that 3/9/2012 occurs, based on a week beginning on Monday (the second argument, 2). error is returned.If Return_type is out of the range specified in the table above, a #NUM! For example, the week containing January 1 is the first week of the year, and is numbered week 1.The WEEKNUM function syntax has the following arguments:Excel stores dates as sequential serial numbers so they can be used in calculations. For more details, see Ron de Bruin's nice write-up on Excel week numbers. Starting with Excel 2010 for Windows and Excel 2011 for Mac, you can generate an ISO week number using 21 as the return_type: = WEEKNUM( date,21) In Excel 2013, there is a new function called ISOWEEKNUM.

With return_type 21, week 1 is the week containing the first Thursday of the year, following The Excel ISOWEEKNUM function takes a date and returns a week number (1-54) that follows ISO standards, where weeks begin on Monday and week number 1 is assigned to the first week in a year that contains a Thursday. In the example shown, the formula in C5, copied down, is: The return_type argument controls which day of the week is used to begin a new week number. To pad week numbers (or any number) with zeros using a formula, you can use the TEXT function.

A number that determines the return value: for example, use 1 when week begins on Sunday, or use 2 when week begins on Monday, or use 21 for ISO week numbers.

Which returns the string "07". WEEKNUM(serial_number,[return_type]) Return_type Week begins on System ... 21 Monday 2 So =WEEKNUM("09/07/2016",21) will calculate as defined in ISO 8601 since Return_type 21 is the only one with System 2. Return_type is optional and defaults to 1.

By default, January 1, 1900 is serial number 1. When entering the argument, we should enter the date using the DATE function or as a result of other formulas or functions. In the example show, D5 contains this formula: Dates should be entered by using the DATE function, or as results of other formulas or functions. As you see, our formula consists of 2 parts: DATE (A2, 1, -2) - WEEKDAY (DATE (A2, 1, 3)) - calculates the date of the last Monday in the previous year. The WEEKNUM function starts counting with the week that contains January 1. Return_type (optional argument) – This specifies which numbering system should be used and which day of the week should be treated as the start of t… error is returned.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. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. =TEXT(WEEKNUM(B5,21),"00") With the date January 5, 2016 in B5, WEEKNUM  returns 2 as the...To sum by week number, you can use a formula based on the SUMIFS function. This article describes the formula syntax and usage of the Returns the week number of a specific date.

B2 * 7 - adds the number of weeks multiplied by 7 (the number of days in a week) to get the Monday (start date) of the week in question.