Joe4
MrExcel MVP, Junior Admin
- Joined
- Aug 1, 2002
- Messages
- 74,817
- Office Version
- 365
- Platform
- Windows
In cell B5 of my spreadsheet, I have a month end date. It will always be the last day of a month (i.e. 1/31/03, 2/28/03, etc.).
In VBA, I need to calculate the following quarter end date based on this date. Essentially, whatever the date is in cell B5, I need to calculate the month end date 3 months into the future.
Here are some examples of dates in B5 and what they should convert to:
1/31/03 -> 4/30/03
9/30/03 -> 12/31/03
11/30/03 -> 2/29/04
etc.
I am working on some code, but it is rather messy, and I would be interested in seeing if others can come up with a simpler, cleaner, solution.
TIA.
In VBA, I need to calculate the following quarter end date based on this date. Essentially, whatever the date is in cell B5, I need to calculate the month end date 3 months into the future.
Here are some examples of dates in B5 and what they should convert to:
1/31/03 -> 4/30/03
9/30/03 -> 12/31/03
11/30/03 -> 2/29/04
etc.
I am working on some code, but it is rather messy, and I would be interested in seeing if others can come up with a simpler, cleaner, solution.
TIA.