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
|To quickly add a specific number of days to a given date, Kutools for Excel's Add Years/Months/Days to Date utilities can give you a favor.|
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
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.
|Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.|
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:
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.