Syntax
WEEKNUMBER(date)
-
date
—The date from which to return the week of the year
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)
This example references the following sheet information:
Row # | Item Number | Transaction Total | Sold Date | Order Date |
---|---|---|---|---|
1 | C001 | $1,170.00 | 02/12/23 | 02/12/23 |
2 | C002 | $1,491.00 | 02/15/23 | 06/12/23 |
3 | C003 | $812.00 | 02/20/23 | 02/20/23 |
Based on the table above, here are some examples of using WEEKNUMBER in a sheet:
Formula | Description | Result |
---|---|---|
=WEEKNUMBER([Order Date]1) | Return the number representing the week of the year for the first row in the Order Date column | 7 |
=IF(WEEKNUMBER([Order Date]2) > 26, "2nd Half Sale", "H1 Sale") | 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. | H1 Sale |
=SUMIF([Sold Date]:[Sold Date], WEEKNUMBER(@cell) < 26, [Transaction Total]:[Transaction Total]) | 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.
| 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.