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)

Return the representing month number for the “Sold Date” column row 1. (February)

2

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

Sum 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, & 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 error displayed in the “Result” for this row. 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