Is there a way to generate comma-delimited values in Excel (optimally using a pivot table)? Consider the following data:
Object color
foo red
foo blue
bar red
bar blue
bar green
baz yellow
I would like to get the table as follows:
Object Count of Color Colors
foo 2 Red, Blue
bar 3 Red, Blue, Green
baz 1 Yellow
Is this possible in Excel? The data comes from an SQL query, so I can write a UDF with a recursive CTE to calculate, but that was for one special query, and I need a quick and dirty way to get denormalized data. In the end, it probably took longer to publish this than to write UDF, but ...
source
share