VBA to Concatenate one column data in excel and dedupe additional line items

Status
Not open for further replies.

Beth0331

New Member
Joined
Jun 13, 2018
Messages
7
Hello, Apologies if this is already on here - I did a search but was not successful in finding anything that is exactly what I'm looking for (and my VBA knowledge is limited...)

I am looking to take data I have in an excel spreadsheet and concatenate one columns data for a referenced "tag" (User ID below) in a another column. For example below, for all line items with the user ID jdoe3 i would like to combine the colors into one line and discard the remaining lines. Are you able to help me with the VBA code I would need to do this?

Currently it looks like this:
NameUser IDColors
John Doejdoe3blue
John Doejdoe3yellow
John Doejdoe3green
John Doejdoe3orange
John Doejdoe3red
John Doejdoe3purple
Jane Smithjsmith5green
Jane Smithjsmith5orange
Jane Smithjsmith5red
George Phillipsgphillipsblue
George Phillipsgphillipsgreen

<tbody>
</tbody>


I would like it to look like this:
NameUser IDColors
John Doejdoe3blue, yellow, green, orange, red, purple
Jane Smithjsmith5green, orange, red
George Phillipsgphillipsblue, green

<tbody>
</tbody>

I'm using excel 2016

Thank You!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Duplicate https://www.mrexcel.com/forum/excel...ional-line-items-post5086520.html#post5086520

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

Note that sometimes posts from new users require Moderator approval before you can see them on the public forums. When this happens, you should see a message to that effect when you try to post it.
Please be patient and do not attempt to post the question again.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,375
Messages
6,119,164
Members
448,870
Latest member
max_pedreira

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