Figure 1. Get First Day of Previous Month in Excel.
If we are required to get the first day of a previous month in Excel, we are going to utilize the EOMONTH function.
Generic Formula
=EOMONTH(date,-2)+1
The EOMONTH function operates by calculating the amount of days and months that it must roll back before determining the first day of the previous month.
How to use the Excel EOMONTH function.
The EOMONTH function operates by calculating the amount of days and months that it must roll back before determining the first day of the previous month. It starts by rolling back 2 months, then proceeds to add 1 day to that particular date which gives us the first day occurring in the previous month.
We are going to demonstrate how we can use the Excel EOMONTH function in 3 simple steps;
- Arrange the dates we are going to check out in a labeled column of our worksheet. Be sure to make provision for the empty cells where Excel will return our results.
See example illustrated below;
Figure 2. Get The First Day of Previous Month in Excel.
- In our example above, our EOMONTH formula to be entered into cell B2 is as follows;
=EOMONTH(A2,-2)+1
Figure 3. Get The First Day of Previous Month in Excel.
- Excel returned the first date result as 12/1/2017. In order to get the other dates, copy a modified version of the EOMONTH formula in cell B2 then enter into the other cells in the PREVIOUS MONTH column.
Figure 4. Get The First Day of Previous Month in Excel.
The last day of a month based on a given date can be determined by the Excel EOMONTH function.
We can calculate the first day of the previous month from any given date traveling back 2 months, then adding one day.
Figure 5. Final Result.
Instant Connection to an Expert through our Excelchat Service:
Our live Excelchat Service is here for you. We have Excel Experts available 24/7 to answer any Excel questions you may have. Guaranteed connection within 30 seconds and a customized solution for you within 20 minutes
Leave a Comment