ExcelOffice

How to Use Excel MONTH Function

To better understand the syntax as well as how to use the MONTH function in Excel, this function to get the value of the month in a specific date, please follow the article below.

1. Learn about the MONTH Function in Excel

The MONTH function in Excel is a function to extract a month value in a specific date. The month is returned as an integer, with values ​​from 1 to 12.

Syntax:

MONTH( serial_number )

The MONTH function is used in all versions of Excel 2016-2000

Where serial_number is any valid day of the month you are trying to find.

To work correctly MONTH formulas in Excel, dates should be entered as numbers, for example 1-5-2015. Formulas like =MONTH(“1-Mar-2015”) also work fine, but sometimes there will be problems if the date is entered as text.

2. Examples of MONTH function in Excel

This is the clearest and easiest example of how to get month number from date.

  • =MONTH(A2) – returns the month of a date in cell A2.
  • =MONTH(DATE(2015,4,15)) – returns 4 corresponding to April. ( DATE(year, month, day) ).
  • =MONTH("15-Apr-2015") – obviously, returns number 4 too.

3. How to convert month name to number in Excel

Combine two Excel functions that can help you convert month names to numbers – DATEVALUE and MONTH. The Excel DATEVALUE function converts a date stored as text into a serial number that Excel recognizes as a date. And then the MONTH function extracts the month from that date.

The complete syntax is as follows:

=MONTH(DATEVALUE(A2 & “1”))

Where A2 in the cell contains the name of the month that you want to convert to a number (& “1” is added to the DATEVALUE function to understand it as a date).

4. Common errors when using the MONTH function in Excel

4.1 #VALUE! error

Cause: This error occurs when the serial_number in the MONTH function is not a GENERAL, DATE, NUMBER value but a TEXT (Text), Character value.

How to fix:

  • Check the data area again.
  • Enter exactly what the function requires is day, month, year in numbers.

4.2  #NAME? error

Cause: In the MONTH function you entered the error value is a letter or a character. For example: MONTH(AA), MONTH(A@),…

How to fix:

  • Check and edit the MONTH function again.

4.3. Error of month value showing like 1 day

Cause: Because the cell or column data format is formatted as “Date”, the output will show up as a date. Here, my output is dated 01/01/1900.

Error returns non-integer.

How to fix:

  • The easiest way to do this is to select the General option from the Excel spreadsheet’s formatting menu.

Above is how to use the MONTH function in Excel to calculate the month very simply, with detailed examples. Hopefully with the information in the article will help you implement the MONTH function in work and study, please leave a comment below when you want to give suggestions and don’t forget to share the article if you find it useful.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button