Syntax. MONTH(serial_number)
Definition. This function extracts the month number from a date. The calculated month numbers are in the range 1 (January) through 12 (December).
Arguments
serial_number (required). The date for which the month number is calculated.
Background. With this function, as well as with the YEAR() and DAY()functions, you can extract a valid date and use the components for other calculations. Use the MONTH() function to group values by month. Note that problems might occur if you enter dates as text. The values returned by the YEAR(), MONTH(), and DAY() functions correspond to the Gregorian calendar.
For more information about saving dates in Excel, see the section titled The Excel Date System in Chapter 2.
Example. Assume that you want to enable the Excel AutoFilter for the months and need to calculate the month values from a date column by using an auxiliary column. To do this, use the formula
=MONTH(date_value)
Here are more examples:
Sample Files
Use the MONTH worksheet in the Date_Time.xls or Date_Time.xlsx sample file. The sample files are found in the Chapter07 folder. For more information about the sample files, see the section titled Using the Sample Files.
3.14.142.194