Suppose we have to get the number of days from a certain days given few months and the day will be end of the last month.
Like the image below.
EOMONTH Function |
If we break our problem,
1. We need the end date of the month or the last date of the month
2. The last month will be current month and the number of months provided.
3. Next step is to get the difference between the Start date and the ‘Month end Date’
In this scenario, EOMONTH
function needs to be used.
Excel has a function
which will give the last date of the month, supplied number of months.
The EOMONTH function is
a built-in function in Excel which is a Date/Time Function.
Syntax :
The syntax for the EOMONTH
function in Microsoft Excel is
=EOMONTH( start_date,
month )
Parameters or Arguments
start_date : A valid
date to return the day.
This function can work after the start date or before the start date.
Month : Count of months in number
Returns : The EOMONTH function returns a serial date value
Therefore, please remember to format the cell or range of cells as date.
In this above example,
we need to type the formula in the C3 cell.
The formula is =EOMONTH(A3,B3).
EOMONTH Function |
You can notice one month
is given negative sign. It will calculate the date before the start date.
Thank you for reading...