Should be Easy (Arghhh) Advance a Date by 1 Month

jase71ds

Board Regular
Joined
Oct 23, 2006
Messages
137
Office Version
  1. 365
Platform
  1. Windows
I've spent way too much time trying to figure this formula out. I need help.
I have a named range "rng_ReportPeriod" that I manually assign a value to on a monthly basis, and it is ALWAYS the last day of the current month.
Thus, currently rng_ReportPeriod is 3-31-18

Elsewhere in my spreadsheet, I need to increment the months by 1, 2, 3 ... 11
So for the area of the spreadsheet where I need to increment by 1, when rng_ReportPeriod is 3-31-18 (as is currently) I need the resulting 1 month increase to return 4-30-18

I've used this formula:
= DATE( YEAR( rng_ReportPeriod ), MONTH (rng_ReportPeriod + 1 ), DAY( rng_ReportPeriod )

If the next month has the same number of days in it, it works fine, thus if rng_ReportPeriod were 7-31-18, the returned result would be 8-31-18
But in a month like March that has 31 days, if I increment by 1 month, instead of 4-30-18, I get 5-1-18.
I DO understand why this is happening, but I DON'T know what to do about it.

In short - I need to take a given date (which will be last day of the month), increment the month by a series of whole numbers, and ALWAYS get the last day of the month.

Thanks for any help.
Jase.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Jase

Try this.

=DATE(YEAR(rng_ReportPeriod), MONTH(rng_ReportPeriod)+2, 0)
 
Upvote 0
Hi.

Check the EDATE(Date, n) Function which shifts a date from n month(s)

To get end of month use EOMONTH(Date, n), which shifts a date from n month(s) and returns the last day of it.
 
Upvote 0
louisH - Thank you - Thank You - THANK YOU!!!
Crap - I practically wasted a whole day yesterday trying to figure this out. Should have come here sooner. Thanks so much!
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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
Back
Top