Reference merged cells to concatenate all values in the adjacent rows

phonesdontfly

New Member
Joined
Mar 2, 2016
Messages
16
Hello!

I have a larger data set that has merged cells in column A (see example below).

Pretend that in column A ("Animal") that lines 2 and 3 are merged, and that lines 4,5,6 are merged. Nothing in column B is merged. the interface isn't allowing me to merge anything here.

column A // Column B
AnimalPet Name
DogJake
Karen
CatBruce
Anna
Ruby

<tbody>
</tbody>


What I would like to do, is have a macro identify which cells are merged, and then concatenate (using line breaks) and merge the cells in the column immediately to the right, such that it looks like this after:

column A // Column B
AnimalPet Name
DogJake
Karen
CatBruce
Anna
Ruby

<tbody>
</tbody>


I hope this makes sense! Thank you all so much!
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

phonesdontfly

New Member
Joined
Mar 2, 2016
Messages
16
I can't figure out how to mark this thread as solved- I found an a solution on another thread. Mods, can you please mark this as complete and/or remove it? Thanks!
 

HarrisQ

New Member
Joined
Apr 14, 2016
Messages
3
I can't figure out how to mark this thread as solved- I found an a solution on another thread. Mods, can you please mark this as complete and/or remove it? Thanks!

You could have included the link to the found solution!
 

Watch MrExcel Video

Forum statistics

Threads
1,127,604
Messages
5,625,755
Members
416,133
Latest member
ToseSenpai

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
Top