MONTH Function

Returns a number representing the number of the month, 1–12, where 1 is January
Sample Usage
MONTH([Due Date]5)
Syntax
MONTH(
  • date
)
  • date
    The date from which you want to return the month
Examples

This example references the following sheet information:

Row #

Sold Date

Transaction Total

Item Number

Clothing Item

1

02/12/19

$1,170.00

C001

T-Shirt

2

02/15/19

$1,491.00

C002

Pants

3

02/20/19

$812.00

C003

Jacket

4 *Leave blank

       

 

Given the table above, here are some examples of using a MONTH() function in a sheet:

 

Formula

Description

Result

=MONTH([Sold Date]1)

Returns the representing month number for row 1 in the Sold Date column (February)

2

=SUMIF([Sold Date]1:[Sold Date]3, MONTH(@cell) = 2, [Transaction Total]1:[Transaction Total]3)

Sums the values in the Transaction Total column if the value in the Sold Date column return a month value equal to 2. Rows 1, 2, and 3 meet the criteria.

$3473

=COUNTIF([Sold Date]:[Sold Date], (MONTH(@cell) = 2)

When the MONTH function contains a blank cell within the range of dates it is reviewing, it will produce the #INVALID DATA TYPE error. This is expected behavior. To resolve this, you’ll want to utilize an IFERROR function.

#INVALID DATA TYPE

=COUNTIF([Sold Date]:[Sold Date], IFERROR(MONTH(@cell), 0) = 2)

By wrapping the MONTH function in an IFERROR function, the function will no longer produce an error. 

 

This formula counts the number of values in the Sold Date column that are equal to 2 (February). 

3

Still need help? 

Use the Smartsheet Formula Template to view examples and practice working with functions in real-time.

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