Duplicate entries based on start and end date

rubbis_with_excel

New Member
Joined
Jan 19, 2004
Messages
28
Hi,
I have some data with start and end dates, and I need to build some VBA to duplicate lines so there are month-specific entries. Hopefully this example *might* explain it :)

If the raw data looks like this:
<b>Name___Start Date___End Date</b>
Person1__01/01/2019___31/03/2019
Person2__10/10/2019___11/11/2019

I want to be able to convert it to:
<b>Name___Start Date___End Date</b>
Person1__01/01/2019___31/01/2019
Person1__01/02/2019___28/02/2019
Person1__01/03/2019___31/03/2019
Person2__10/10/2019___31/10/2019
Person2__01/11/2019___11/11/2019

So that each month is represented on a different row.

I've been racking my brains for hours and I just can't get it to work! :(

If anyone has any ideas, I would be very grateful.

Thanks
 
How can I see your posted to learn more from you ?
If you click on my icon, in any post, you can click on the "Follow" button, i.e. if I wanted to follow you:

1724757710420.png
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,434
Messages
6,172,110
Members
452,444
Latest member
ShaImran193

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