need macro help - text extraction from cell with line breaks

databasewolfy

New Member
Joined
Aug 12, 2019
Messages
6
I have a spreadsheet with several hundreds of entries all separated by line breaks. How can I get the data below to look like the end result?

Thanks in advance!





<colgroup><col style="width:48pt" width="64"> <col style="mso-width-source:userset;mso-width-alt:3816;width:82pt" width="109"> <col style="mso-width-source:userset;mso-width-alt:4561;width:98pt" width="131"> </colgroup><tbody>
[TD="class: xl65, width: 64, align: left"]location[/TD]
[TD="class: xl66, width: 109, align: left"]device1[/TD]
[TD="class: xl67, width: 131, align: left"]app1
<line break>
app2
<line break>
app3
<line break>
etc…[/TD]

[TD="class: xl65, align: left"]location[/TD]
[TD="class: xl66, align: left"]device2[/TD]
[TD="class: xl67, width: 131, align: left"]app1
<line break>
app2
<line break>
app3
<line break>
etc…[/TD]

[TD="align: left"]to the desired result:
[/TD]

[TD="class: xl65, align: left"]location[/TD]
[TD="align: left"]device1[/TD]
[TD="align: left"]app1[/TD]

[TD="class: xl65, align: left"]location[/TD]
[TD="align: left"]device1[/TD]
[TD="align: left"]app2[/TD]

[TD="class: xl65, align: left"]location[/TD]
[TD="align: left"]device1[/TD]
[TD="align: left"]app3[/TD]

[TD="class: xl65, align: left"]location[/TD]
[TD="align: left"]device2[/TD]
[TD="align: left"]app1[/TD]

[TD="class: xl65, align: left"]location[/TD]
[TD="align: left"]device2[/TD]
[TD="align: left"]app2[/TD]

[TD="class: xl65, align: left"]location[/TD]
[TD="align: left"]device2[/TD]
[TD="align: left"]app3[/TD]

</tbody>
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
You can use text to columns to spli out col C & then use the macro I supplied in your other post.
 
Upvote 0
You can use text to columns to spli out col C & then use the macro I supplied in your other post.
Yeah. Apparently CTRL+J means linebreak. Not like there can be a nice little option for it. Many thanks for your help. Got it all figured out.
 
Upvote 0
Glad you sorted it & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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