madhuchelliah
Board Regular
- Joined
- Nov 22, 2017
- Messages
- 226
- Office Version
- 2019
- Platform
- Windows
Hello Folks, Greetings for the day. I have repeated data in the A column. But the equivalent values in the C column is different. I want to combine all the data into single cell in the D column if the data is not repeated in A column then the same data should be retained from C column to D column. While combining the data should be separated by comma and a space (, ). Data in the D column is the expected result. Please go through the example below for more clarity. Thank you.
[TABLE="class: grid, width: 200, align: center"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1A
[/TD]
[TD][/TD]
[TD]XXXXX, YYYYY
[/TD]
[TD]XXXXX, YYYYY, ZZZZ
[/TD]
[/TR]
[TR]
[TD]1A
[/TD]
[TD][/TD]
[TD]ZZZZZ
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1B
[/TD]
[TD][/TD]
[TD]AAAAA
[/TD]
[TD]AAAAA
[/TD]
[/TR]
[TR]
[TD]1C
[/TD]
[TD][/TD]
[TD]BBBBB
[/TD]
[TD]BBBBB
[/TD]
[/TR]
[TR]
[TD]5A
[/TD]
[TD][/TD]
[TD]CCCCC
[/TD]
[TD]CCCCC, DDDDD
[/TD]
[/TR]
[TR]
[TD]5A
[/TD]
[TD][/TD]
[TD]DDDDD
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD][/TD]
[TD]EEEEE
[/TD]
[TD]EEEEE, FFFFF, GGGGG, HHHHH
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD][/TD]
[TD]FFFFF
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD][/TD]
[TD]GGGGG
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD][/TD]
[TD]HHHHH
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15A
[/TD]
[TD][/TD]
[TD]IIIII
[/TD]
[TD]IIIII
[/TD]
[/TR]
[TR]
[TD]15B
[/TD]
[TD][/TD]
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