How to use MONTH and EOMONTH functions in the Excel package

The guidelines on using the MONTH and EOMONTH functions of Excel are outlined in this tutorial. There are series of examples of getting the month from date. All you should do is get the first and the last day of the month, then change or convert the name of the month to a number and more.

In our last or former write-up, we looked at many functions of the Excel package that have to do with weekdays and the days of the year. In this article, we will be using much time compared to the previous article to study the functions of the Excel package concerning months.

There is a unique function provided for in Microsoft Excel concerning a month. This function replaces the number of the month with a layout from 1(January) to 12 (December).

All versions of Excel 2016 – 2000 features the MONTH function, and its mode of operations is quite simplified.

MONTH (Serial_number)

Serial_number is any date of the month you are looking for.

In order to avoid mistakes in achieving your aim while working with the Excel MONTH function, you should input a DATE using the correct method, i.e. (year, month, and day). For example, using the formula=MONTH(DATE(2015,3,1)), 3 is being returned since DATE stands for March 1st, 2015 being the first day of March.

Formulas like =MONTH("1-Mar-2015") can also be used, although there might be complications faced in harder tasks if dates are inputted as text.

To save yourself the stress of prescribing a date in the MONTH function, it is easier to make reference to a cell using a date or provide a specific date returned by other functions. For instance:

=MONTH(A1) – returns the month of a date in cell A1.

=MONTH(TODAY()) – returns the number of the current month.

At first glance, the MONTH function of Excel may appear very casual and simple, but from the examples below, you will be marveled about a whole lot of functions and activities it can really do.

Ways in which month number can be gotten from date in Excel

So many ways exist in order to acquire month numbers from date in Excel. The one to pick is dependent on your aim or what you are trying to get.

1. Getting month Number from date, i.e., the MONTH function.

It is the most explicit and easy-going means in Excel of changing the date to month. For example:

=MONTH(A2) – returns a specific month of a particular date in cell A2.

=MONTH(DATE(2015,4,15)) – returns 4 corresponding to April.

=MONTH("15-Apr-2015") – obviously, returns number 4 too.

2. Separating month as a text string – TEXT function in Excel

Another way of using the Excel function to get a month number is by making use of the TEXT function:

=TEXT(A2, "m") – returns a month number without a leading zero, like 1 – 12.

=TEXT(A2,"mm") – returns a month number with a leading zero, as 01 – 12.

Absolute caution must be observed while using the TEXT function since they return monthly numbers as text strings. So if you intend to carry out other activities or make use of the returned numbers in other calculations and formulas, it is safer to stay put while using the MONTH function of Excel.

 

 

 

 

 

 

 

The results returned by all of the formulas are being displayed in the screenshot above. Take note of how numbers returned are aligned to the left using the MONTH function (cells C2 and C3) and compare them to how text values returned are arranged to the left using the TEXT function (Cells C4 and C5).

Leave a Comment