change date

Lauren3077

New Member
Joined
Apr 9, 2021
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I have a column of dates. They will all be different every month, but for last month range from 3/1/2021 to 3/31/2021. I need it to change the date to the last day of the month four months from the date. So, all of March's dates will need to change to 7/31/2021 but I need a formula that will change April's dates to August 31 and May's to September 30 and so on. It's a monthly spreadsheet. It also needs to start in D2 but go down as far as there is information, which is different every month. I saved this one until the end because I have no idea where to even start.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,952
Office Version
  1. 365
Platform
  1. Windows
but I need a formula that will change April's dates to August 31 and May's to September 30 and so on.
That's what EOMONTH is for
Excel Formula:
=EOMONTH(D2,4)
The digit at the end is the number of months to add, use 0 if you need the end of the current month.
 
Solution

Lauren3077

New Member
Joined
Apr 9, 2021
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Oh man, that was so easy. Thank you guys so much for your help.
 

Watch MrExcel Video

Forum statistics

Threads
1,133,244
Messages
5,657,586
Members
418,401
Latest member
B_A_M155

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top