I have an Excel file that has the following columns. I need to have each Fitment Year listed as a single row. Is there a way to create a Macro that would look at the fitment years cell and then duplicate the row for each year? This is an ongoing macro that I will have to run each month against an Excel file that has several hundred lines that will expand exponentially once it is expanded for each year. I really need your help! I'm desperate.
THIS IS WHAT I HAVE:
[TABLE="width: 881"]
<tbody>[TR]
[TD]P/N[/TD]
[TD]Make[/TD]
[TD]Mfg[/TD]
[TD]Model[/TD]
[TD]Year Span[/TD]
[TD]Fitment Years[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 881"]
<tbody>[TR]
[TD]881612[/TD]
[TD]Aprilia[/TD]
[TD]881965[/TD]
[TD]1000 RSV4 - (SACHS)[/TD]
[TD]10-12[/TD]
[TD]2010, 2011, 2012[/TD]
[/TR]
</tbody>[/TABLE]
THIS IS WHAT I NEED IT TO BE:
[TABLE="width: 494"]
<tbody>[TR]
[TD]P/N[/TD]
[TD]Make[/TD]
[TD]Mfg[/TD]
[TD]Model[/TD]
[TD]YearSpan[/TD]
[TD]Fitment Years[/TD]
[/TR]
[TR]
[TD]881612[/TD]
[TD]Aprilia[/TD]
[TD]881965[/TD]
[TD]1000 RSV4 - (SACHS)[/TD]
[TD]10-12[/TD]
[TD="align: right"]2010[/TD]
[/TR]
[TR]
[TD]881612[/TD]
[TD]Aprilia[/TD]
[TD]881965[/TD]
[TD]1000 RSV4 - (SACHS)[/TD]
[TD]10-12[/TD]
[TD="align: right"]2011[/TD]
[/TR]
[TR]
[TD]881612[/TD]
[TD]Aprilia[/TD]
[TD]881965[/TD]
[TD]1000 RSV4 - (SACHS)[/TD]
[TD]10-12[/TD]
[TD="align: right"]2012[/TD]
[/TR]
</tbody>[/TABLE]
THIS IS WHAT I HAVE:
[TABLE="width: 881"]
<tbody>[TR]
[TD]P/N[/TD]
[TD]Make[/TD]
[TD]Mfg[/TD]
[TD]Model[/TD]
[TD]Year Span[/TD]
[TD]Fitment Years[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 881"]
<tbody>[TR]
[TD]881612[/TD]
[TD]Aprilia[/TD]
[TD]881965[/TD]
[TD]1000 RSV4 - (SACHS)[/TD]
[TD]10-12[/TD]
[TD]2010, 2011, 2012[/TD]
[/TR]
</tbody>[/TABLE]
THIS IS WHAT I NEED IT TO BE:
[TABLE="width: 494"]
<tbody>[TR]
[TD]P/N[/TD]
[TD]Make[/TD]
[TD]Mfg[/TD]
[TD]Model[/TD]
[TD]YearSpan[/TD]
[TD]Fitment Years[/TD]
[/TR]
[TR]
[TD]881612[/TD]
[TD]Aprilia[/TD]
[TD]881965[/TD]
[TD]1000 RSV4 - (SACHS)[/TD]
[TD]10-12[/TD]
[TD="align: right"]2010[/TD]
[/TR]
[TR]
[TD]881612[/TD]
[TD]Aprilia[/TD]
[TD]881965[/TD]
[TD]1000 RSV4 - (SACHS)[/TD]
[TD]10-12[/TD]
[TD="align: right"]2011[/TD]
[/TR]
[TR]
[TD]881612[/TD]
[TD]Aprilia[/TD]
[TD]881965[/TD]
[TD]1000 RSV4 - (SACHS)[/TD]
[TD]10-12[/TD]
[TD="align: right"]2012[/TD]
[/TR]
</tbody>[/TABLE]