Hello,
I have this table with data. If the numbers match then consolidate the data in the row into one cell dividing the values with a comma.
[TABLE="width: 326"]
<tbody>[TR]
[TD]Number
[/TD]
[TD]Data 1
[/TD]
[TD]Data 2
[/TD]
[TD]Data 3
[/TD]
[TD]
[/TD]
[TD]Number
[/TD]
[TD]Result
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]a
[/TD]
[TD]b
[/TD]
[TD]c
[/TD]
[TD]5
[/TD]
[TD]b
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]c
[/TD]
[TD]8
[/TD]
[TD]a
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]a
[/TD]
[TD]b
[/TD]
[TD]
[/TD]
[TD]2
[/TD]
[TD]c
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]a
[/TD]
[TD]
[/TD]
[TD]c
[/TD]
[TD]7
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]
[/TD]
[TD]b
[/TD]
[TD]
[/TD]
[TD]4
[/TD]
[TD]a, c
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]
[/TD]
[TD]b
[/TD]
[TD]c
[/TD]
[TD]1
[/TD]
[TD]a, b, c
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]6
[/TD]
[TD]b, c
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]a
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]3
[/TD]
[TD]a, b
[/TD]
[/TR]
</tbody>[/TABLE]
I am open to use a function or UDF.
I thought of combining two functions =VLOOKUP() and =CONCATENATE()
Here are some near solutions that I found but they consolidate the column data and not the row data.
http://www.get-digital-help.<wbr>com/2010/12/20/excel-udf-<wbr>lookup-and-return-multiple-<wbr>values-concatenated-into-one-<wbr>cell/
http://www.ozgrid.com/forum/<wbr>showthread.php?t=94895&p=<wbr>445111#post445111
http://www.ozgrid.com/forum/<wbr>showthread.php?t=25239&p=<wbr>128076#post128076
I have this table with data. If the numbers match then consolidate the data in the row into one cell dividing the values with a comma.
[TABLE="width: 326"]
<tbody>[TR]
[TD]Number
[/TD]
[TD]Data 1
[/TD]
[TD]Data 2
[/TD]
[TD]Data 3
[/TD]
[TD]
[/TD]
[TD]Number
[/TD]
[TD]Result
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]a
[/TD]
[TD]b
[/TD]
[TD]c
[/TD]
[TD]5
[/TD]
[TD]b
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]c
[/TD]
[TD]8
[/TD]
[TD]a
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]a
[/TD]
[TD]b
[/TD]
[TD]
[/TD]
[TD]2
[/TD]
[TD]c
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]a
[/TD]
[TD]
[/TD]
[TD]c
[/TD]
[TD]7
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]
[/TD]
[TD]b
[/TD]
[TD]
[/TD]
[TD]4
[/TD]
[TD]a, c
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]
[/TD]
[TD]b
[/TD]
[TD]c
[/TD]
[TD]1
[/TD]
[TD]a, b, c
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]6
[/TD]
[TD]b, c
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]a
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]3
[/TD]
[TD]a, b
[/TD]
[/TR]
</tbody>[/TABLE]
I am open to use a function or UDF.
I thought of combining two functions =VLOOKUP() and =CONCATENATE()
Here are some near solutions that I found but they consolidate the column data and not the row data.
http://www.get-digital-help.<wbr>com/2010/12/20/excel-udf-<wbr>lookup-and-return-multiple-<wbr>values-concatenated-into-one-<wbr>cell/
http://www.ozgrid.com/forum/<wbr>showthread.php?t=94895&p=<wbr>445111#post445111
http://www.ozgrid.com/forum/<wbr>showthread.php?t=25239&p=<wbr>128076#post128076