VBA code to split text data from a cell into multiple cells/rows

AliceDB

New Member
Joined
Jun 22, 2016
Messages
1
Hello All,

I need your help with a VBA code which should split the data from wrapped text cells into different cells / rows. For the ones which are empty, to let them empty.

I tried different macros, but with no luck.

Thanks a lot in advance,

[TABLE="width: 1756"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]ID[/TD]
[TD]Created By[/TD]
[TD]Created[/TD]
[TD]Title[/TD]
[TD]Quarter[/TD]
[TD]Review[/TD]
[TD]Pr Name[/TD]
[TD]Pr Name2[/TD]
[TD]Platform[/TD]
[TD]Work Done[/TD]
[TD]Hours[/TD]
[TD]Deal Descrip[/TD]
[TD]Issue Descrip[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]Alice [/TD]
[TD="align: right"]4/1/2016 4:06[/TD]
[TD]OP[/TD]
[TD]Q2FY16[/TD]
[TD]20[/TD]
[TD]product name1
product name 2
product name 3[/TD]
[TD]Waived
Wi
Other[/TD]
[TD]Desktop
Mobile
On-demand[/TD]
[TD]Work done 1
Work done 2
Work done3[/TD]
[TD]45[/TD]
[TD]Deal description 1
Deal description 11
Deal description 12[/TD]
[TD]Issue description 1
Issue description 11
Issue description 12[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]Tom [/TD]
[TD="align: right"]4/1/2016 4:38[/TD]
[TD]OP[/TD]
[TD]Q2FY16[/TD]
[TD]22[/TD]
[TD]Product Name 1
Product Name 11
Product Name 1122[/TD]
[TD][/TD]
[TD][/TD]
[TD]Work Done
Work Done 33
Work Done 3344[/TD]
[TD]33[/TD]
[TD]deal description 1
deal description 11
deal description 12[/TD]
[TD]issue description 1
issue description 11
issue description 12[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]Alice [/TD]
[TD="align: right"]4/1/2016 4:47[/TD]
[TD]OP[/TD]
[TD]Q2FY16[/TD]
[TD]25[/TD]
[TD]Product name 1
Product name 2[/TD]
[TD][/TD]
[TD][/TD]
[TD]work done 1
work done 3[/TD]
[TD][/TD]
[TD]Deal description 1
Deal description 122[/TD]
[TD]Issue Description 1
Issue Description 122[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]Alice [/TD]
[TD="align: right"]4/6/2016 5:50[/TD]
[TD]OP[/TD]
[TD]Q2FY16[/TD]
[TD]30[/TD]
[TD]Product Name
Product Name Description
product name different than the above[/TD]
[TD]Audit
Pal
Wi[/TD]
[TD]Desktop
Mobile
Services[/TD]
[TD]Work Done 1 comments comments 1
Work Done described in multiple lines
[/TD]
[TD]15[/TD]
[TD]Deal Description comments comments comments comments comments comments comments comments comments comments comments comments comments comments
other Deal Description other Deal Descriptionother Deal Description, other Deal Descriptionother Deal Description other Deal Descriptionother Deal Description.
New Deal Description, comments New Deal Description, comments New Deal Description, comments New Deal Description, comments New Deal Description, comments New Deal Description, comments New Deal Description, comments New Deal Description, comments [/TD]
[TD]Issue Description Issue Description Issue Description Issue Description Issue Description Issue Description Issue Description
new issue descriptions, new issue descriptions new issue descriptions new issue descriptions new issue descriptions new issue descriptions new issue descriptions new issue descriptions new issue descriptions new issue descriptions new issue descriptions new issue descriptions new issue descriptions new issue descriptions .
Issue Issue Description on the customer support Issue Description on the support Issue Description on the support Issue Description on the Issue Description on the support . [/TD]
[/TR]
</tbody>[/TABLE]
Expectation:

[TABLE="width: 1132"]
<colgroup><col span="3"><col><col span="2"><col><col><col><col></colgroup><tbody>[TR]
[TD]Title[/TD]
[TD]Quarter[/TD]
[TD]Review[/TD]
[TD]Pr Name[/TD]
[TD]Pr Name2[/TD]
[TD]Platform[/TD]
[TD]Work Done[/TD]
[TD]Hours[/TD]
[TD]Deal Descrip[/TD]
[TD]Issue Descrip[/TD]
[/TR]
[TR]
[TD]OP[/TD]
[TD]Q2FY16[/TD]
[TD]20[/TD]
[TD]product name1[/TD]
[TD]Waived[/TD]
[TD]Desktop[/TD]
[TD]Work done 1 [/TD]
[TD="align: right"]45[/TD]
[TD]Deal description 1[/TD]
[TD]Issue description 1[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]product name 2[/TD]
[TD]Wi[/TD]
[TD]Mobile[/TD]
[TD]Work done 2[/TD]
[TD] [/TD]
[TD]Deal description 11[/TD]
[TD]Issue description 11[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]product name 3[/TD]
[TD]Other[/TD]
[TD]On-demand[/TD]
[TD]Work done3[/TD]
[TD] [/TD]
[TD]Deal description 12[/TD]
[TD]Issue description 12[/TD]
[/TR]
[TR]
[TD]OP[/TD]
[TD]Q2FY16[/TD]
[TD]22[/TD]
[TD]Product Name 1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Work Done [/TD]
[TD="align: right"]33[/TD]
[TD]deal description 1[/TD]
[TD]Issue description 1[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Product Name 11[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Work Done 33[/TD]
[TD][/TD]
[TD]Deal description 11[/TD]
[TD]Issue description 11[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Product Name 1122[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Work Done 3344[/TD]
[TD][/TD]
[TD]Deal description 12[/TD]
[TD]Issue description 12[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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