Microsoft KB Archive/74303

{|
 * width="100%"|

Excel: MONTH Function Tip in Excel Documentation Is Incorrect

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 3.0, 4.0
 * Microsoft Excel for OS/2, version 3.0
 * Microsoft Excel for the Macintosh, versions 3.0, 4.0

-

SUMMARY
The MONTH function reference on page 279 of the version 4.0 &quot;Microsoft Excel Function Reference&quot; (page 156 in the version 3.0 manual) includes the following tip:

  To display the result of the MONTH function as a month name, use the Number command on the Format menu to format the cell containing the function with the custom number format &quot;mmmm&quot;.

Page 156 of the version 3.0 &quot;Microsoft Excel Function Reference&quot; also includes the following example for the MONTH function:

  TEXT(MONTH(367),&quot;mmmm&quot;)

Both of these entries are incorrect. The MONTH function returns an integer value from 1 to 12, based on the specified date.

MORE INFORMATION
To achieve the effect suggested in the tip in the manual, do one of the following


 * Use the one of the following formulas:

=TEXT(367,&quot;mmmm&quot;)

Note: In the above example, 367 is the serial number of the date 1/1/01.

-or-

=TEXT(DATEVALUE(&quot;1/1/01&quot;),&quot;mmmm&quot;)

-or-
 * Enter the date into a cell and format that cell with the custom number format &quot;mmmm&quot;.

The number format &quot;mmmm&quot; applies to a serial date number. The serial numbers 1 through 12 correspond to the serial dates January 1, 1900 through January 12, 1900.

The TEXT function interprets this as a date between 1/1/00 and 1/12/00, based on the month in which the date falls. This date range falls completely within the month of January so the TEXT function, as used in the example above, will always return &quot;January.&quot;