Syntax
WEEKNUMBER(date)
- date—The date from which to return the week of the year
Sample usage
WEEKNUMBER([Due Date]5)
Usage notes
Smartsheet calculates week numbers based on Mondays. The first day of the year may not be in the first week of the year because of this.
- If January 1 is a Monday, WEEKNUMBER returns 1
- If January 1 is a Friday, WEEKNUMBER returns 52 (or 53, if there are 53 weeks in that year)
Examples
This example references the following sheet information:
Row # | Item Number | Transaction Total | Sold Date | Order Date |
---|---|---|---|---|
Row # 1 | Item Number C001 | Transaction Total $1,170.00 | Sold Date 02/12/24 | Order Date 02/12/24 |
Row # 2 | Item Number C002 | Transaction Total $1,491.00 | Sold Date 02/15/24 | Order Date 06/12/24 |
Row # 3 | Item Number C003 | Transaction Total $812.00 | Sold Date 02/20/24 | Order Date 02/20/24 |
Based on the table above, here are some examples of using WEEKNUMBER in a sheet:
Formula | Description | Result |
---|---|---|
Formula =WEEKNUMBER([Order Date]1) | Description Return the number representing the week of the year for the first row in the Order Date column | Result 7 |
Formula =IF(WEEKNUMBER([Order Date]2) > 26, "2nd Half Sale", "H1 Sale") | Description If the number representing the week of the year for the second row in the Order Date column is greater than 26, produce the value 2nd Half Sale. Otherwise, produce the value H1 Sale. | Result H1 Sale |
Formula =SUMIF([Sold Date]:[Sold Date], WEEKNUMBER(@cell) < 26, [Transaction Total]:[Transaction Total]) | Description Get the sum of the Transaction Total column if the Sold Date column at the cell level returns a number representing the week of the year less than 26.
| Result 3473 |
Still need help?
Use the Formula Handbook template to find more support, resources, view 100+ formulas, a glossary of every function that you can practice working with in real time, and examples of commonly used and advanced formulas.
Find examples of how other Smartsheet customers use this function or ask about your specific use case in the Smartsheet online Community.