WEEKNUMBER Function

Returns a number representing the week of the year, 1–53, where 1 is the first week in the year.
Sample usage
WEEKNUMBER([Due Date]5)

Syntax

WEEKNUMBER(date)
  • date
    The date from which to return the week of the year
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 NumberTransaction TotalSold DateOrder Date
1C001$1,170.0002/12/2302/12/23
2C002$1,491.0002/15/2306/12/23
3C003$812.0002/20/2302/20/23

 

Based on the table above, here are some examples of using WEEKNUMBER in a sheet:

FormulaDescriptionResult
=WEEKNUMBER([Order Date]1)Return the number representing the week of the year for the first row in the Order Date column7
=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.


Rows 1, 2, and 3 apply.
 

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.

Ask the Community

Was this article helpful?
YesNo