-
date
- date—The date from which to return the week of the year.
- Smartsheet calculates week numbers based on Mondays. Due to this, the first day of the year may not be in the first week of the year. For example, if January 1st is a Monday, WEEKNUMBER returns 1, however if it’s a Friday, WEEKNUMBER returns 52.
This example references the following sheet information:
Row # |
Item Number |
Transaction Total |
Sold Date |
Order Date |
---|---|---|---|---|
1 |
C001 |
$1,170.00 |
02/12/19 |
02/12/19 |
2 |
C002 |
$1,491.00 |
02/15/19 |
06/12/19 |
3 |
C003 |
$812.00 |
02/20/19 |
02/20/19 |
Given 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 “Order Date” column row 1. |
7 |
=IF(WEEKNUMBER([Order Date]2) > 26, "2nd Half Sale", "H1 Sale") |
IF the number representing the week of the year for the “Order Date” column row 2 is greater than 26, produce the value “2nd Half Sale", if not produce the value "H1 Sale". |
H1 Sale |
=SUMIF([Sold Date]:[Sold Date], WEEKNUMBER(@cell) < 26, [Transaction Total]:[Transaction Total]) |
Sum the “Transaction Total” column value if the “Sold Date” column at the cell level returns a number representing the week of the year less than 26. Rows 1, 2, & 3 apply. |
3473 |