Merge multiple groups of adjacent cells, which are separated by a blank cell, into respective single cells.

NateZona

New Member
Joined
Dec 15, 2015
Messages
16
Dear fine people of Mr. Excel,

I am not sure if this has a possible solution, but here is my problem...

I have a pdf with a large list of hyperlinks which have a text description attached to them. I tried many different ways of copy and paste to get them formatted correctly in excel to no avail.
However, I was able to separate them into groups of cells with a blank cell in between. Some groups are three cells, some are two cells.

Here is an example of what I mean...

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Data1a[/TD]
[/TR]
[TR]
[TD]Data1b[/TD]
[/TR]
[TR]
[TD]Data1c[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Data2a[/TD]
[/TR]
[TR]
[TD]Data2b[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Data3a[/TD]
[/TR]
[TR]
[TD]Data3b[/TD]
[/TR]
[TR]
[TD]Data3c[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Data4a[/TD]
[/TR]
[TR]
[TD]Data4b[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Data5a[/TD]
[/TR]
[TR]
[TD]Data5b[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Data6a[/TD]
[/TR]
[TR]
[TD]Data6b[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

What I would like to do is be able to combine each group into one cell respectively (i.e., "Data1a-c" in one cell, and "Data2a-b" in one cell, etc) using a macro on the whole sheet.


I have so many of these groups that it will take far too long to manually combine them one by one.

Thank you for your time, and I hope to hear from you soon!

Warm Regards,
Nate Zona
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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