How to show first or last day of previous month based on given date in Excel?

Show first day of previous month based on given dates
Show last day of previous month based on given dates
Show first day of previous month based on given dates
To show the first day of previous month, here is a formula can quickly solve.
Select a blank cell next to the given date, for instance, B2, and enter this formula =EOMONTH(A2,-2)+1, A2 is the given date, and then drag auto fill handle over the cells which you need to apply this formula. See screenshot:
Now the first day of previous month based on each given dates has been displayed.
Show last day of previous month based on given dates
To find the last day of previous month by given dates, you can apply one of below formulas to a blank cell and then apply the formula to the cells you want by dragging the auto fill handle. See screenshot:
=EOMONTH(A2,-1)
=DATE(YEAR(A2),MONTH(A2),0)
Note: the formula =EOMONTH(A2,-1) will return 5-digits number. For changing the 5-digits number to standard date, please select it and click Home > Number Format > Short Date.
Relative Article:
How to easily enter dates without slashes in Excel?
Best Office Productivity Tools
Supports Office/Excel 2007-2021 and 365 | Available in 44 Languages | Easy to Uninstall Completely
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need Is Just A Click Away...
Supercharge Your Excel Skills: Experience Efficiency Like Never Before with Kutools for Excel (Full-Featured 30-Day Free Trial)
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day! (Full-Featured 30-Day Free Trial)
