Concatenate multiple unique values with same source value

Guitarmageddon

Board Regular
Joined
Dec 22, 2014
Messages
161
hello everyone, tried doing with dax and regular excel methods but scratching my head

here is a table example. the "style" number is repeated because there are multiple vendors that source the product. i simply want to concatenate each of the vendor names together separated by a comma. how would I do this?

for example, the first style, (ending in 715) would concatenate "service command , s c johnson & son inc"


[TABLE="class: grid, width: 398"]
<colgroup><col width="107" style="width: 80pt; mso-width-source: userset; mso-width-alt: 3913;"> <col width="81" style="width: 61pt; mso-width-source: userset; mso-width-alt: 2962;"> <col width="229" style="width: 172pt; mso-width-source: userset; mso-width-alt: 8374;"> <col width="113" style="width: 85pt; mso-width-source: userset; mso-width-alt: 4132;"> <tbody>[TR]
[TD="width: 107"]STYLE[/TD]
[TD="width: 81"]VENDOR NUM
[/TD]
[TD="width: 229"]VENDOR NAME
[/TD]
[TD="width: 113"]Vendor Style[/TD]
[/TR]
[TR]
[TD="width: 107"]00000000333715[/TD]
[TD="width: 81"]00001707694[/TD]
[TD="width: 229"]SERVICE COMMAND
[/TD]
[TD="width: 113"]333715[/TD]
[/TR]
[TR]
[TD]00000000333715[/TD]
[TD]00006091417[/TD]
[TD]S C JOHNSON & SON INC
[/TD]
[TD]333715[/TD]
[/TR]
[TR]
[TD]00322474385441[/TD]
[TD]00147491195[/TD]
[TD]SCOTTS MIRACLE GRO CO(BAG GDS)[/TD]
[TD]4385404[/TD]
[/TR]
[TR]
[TD]00465007111071[/TD]
[TD]00001707694[/TD]
[TD]SERVICE COMMAND
[/TD]
[TD]71110
[/TD]
[/TR]
[TR]
[TD]00465007111071[/TD]
[TD]00006091417[/TD]
[TD]S C JOHNSON & SON INC[/TD]
[TD]71110[/TD]
[/TR]
[TR]
[TD]00465007111141[/TD]
[TD]00001707694[/TD]
[TD]SERVICE COMMAND
[/TD]
[TD]7693098
[/TD]
[/TR]
[TR]
[TD]00465007184891[/TD]
[TD]00001707694[/TD]
[TD]SERVICE COMMAND
[/TD]
[TD]71848[/TD]
[/TR]
[TR]
[TD]00465007184891[/TD]
[TD]00006091417[/TD]
[TD]S C JOHNSON & SON INC[/TD]
[TD]71848
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi,

Which version of excel do you use?
What do you want, formula, or VBA code?
 
Upvote 0
Hi,

Which version of excel do you use?
What do you want, formula, or VBA code?

Hello! 2016... VBA could work fine. In the future, Id like it to be flexible where I may run into the same situation, but just with different parent column names, but you get the concept. Also, there are a few occurences in the data set that are more than 2 vendor names for a style, if that matters
 
Upvote 0

Forum statistics

Threads
1,223,157
Messages
6,170,419
Members
452,325
Latest member
BlahQz

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