Home Privacy Policy Feedback Link to us Site Map Forums

Excel: Month Function


In Excel, the Month function returns the month (a number from 1 to 12) given a date value.

The syntax for the Month function is:

Month( date_value )

date_value is a valid date.


Applies To:

  • Excel 2007, Excel 2003, Excel XP, Excel 2000

For example:

Let's take a look at an example:

Based on the Excel spreadsheet above:

=Month(A1) would return 1.
=Month(A2) would return 3.
=Month(A3) would return 2.

VBA Code

The Month function can also be used in VBA code. For example:

Dim LMonth As Integer

LMonth = Month("12/31/2001")

In this example, the variable called LMonth would now contain the value of 12.