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!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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!
 
Upvote 0

Forum statistics

Threads
1,215,706
Messages
6,126,332
Members
449,308
Latest member
Ronaldj

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