[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
WEEKNUM ( serial-value [ , weekday-start-flag ] )
Description: Computes the week number of the date corresponding to serial-value. The week containing January 1 is the first week of the year, and is numbered week 1.
Arguments:
Name |
Type |
Description | ||||||
serial-value |
number |
The date whose week number is to be computed. The value of serial-value is truncated to an integer. | ||||||
weekday-start-flag |
number |
When truncated to integer, indicates the weekday on which the week begins, as follows:
|
Return Type and Value: number – The week number of the date corresponding to serial-value.
However, if
• serial-value is out of range for the current date base value, #NUM! is returned.
• weekday-start-flag is out of the range specified in the table above, #NUM! is returned.
[Example:
WEEKNUM(DATE(2006,1,1) results in 1
WEEKNUM(DATE(2006,1,1),1) results in 1
WEEKNUM(DATE(2006,2,1),1) results in 5
WEEKNUM(DATE(2006,2,1),2) results in 6
end example]