Hi,
Can one of VBA gurus please help me with the VBA code and Excel formula? The data is attached in the spreadsheet: "Product IDs".
The data is a set of Master Product IDs (parent) and the Linked to them Products (children). I need to create a relationship between unique parents (Master Product IDs) and their children (Linked Products)
From the Data Set table, need to vlookup the unique value in column A (Master Product ID) and return comma delimited (concatenated) corresponding values from column B (Linked Products). So, the result will be as shown in Table 2. Ideally, I would need the results as shown in the Table 3 as an output in the attached spreadsheet. There are only three unique families in Table 3. But if it is difficult to do, then Table 2 results will do.
I would really appreciate your help. Thank you in advance!
Table 1
DATA SET
Master Product ID Linked Products
11 1
11 2
11 3
11 4
4 11
4 3
4 2
4 1
3 1
3 2
3 4
3 11
2 1
2 3
2 4
2 11
1 2
1 11
1 4
1 3
232 43
232 85
232 16
16 232
16 85
16 43
43 85
43 16
43 232
85 16
85 232
85 85
123 89
89 123
I need to
WOULD RETURN comma delimited Linked Product IDs for each corresponding product like depicted in Linked Products column in Table 2 below.
Table 2
Master Product ID Linked Products
11 1,2,3,4
4 1,2,3,11
3 1,2,4,11
2 1,3,4,11
1 2,3,4,11,
232 16,43,85
16 43,85,232
43 16,85,232
85 16,43,232
123 89
89 123
Bookmarks