Hi, I really hope someone can help...
I have an issue currently that I have overcome with a 3rd party add-on. I am sure there is a way to do this with a macro, however my attempts so far have failed. I am hoping someone can prove the power of VBA and Macros and enable the removal of the 3rd party add-on.
Basically the issue is, where there are several rows (that may not directly follow each other) that have the same data in column A but different data in other columns, there is a combine operation required.
Where two (or more) rows contain an identical value in column A, I want to merge the content of Column H and Column K separated with a new line.
Note: There is a header on row 1 and Column K may not always have a value.
eg:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]ID
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Data1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Data2
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]111
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]test
[/TD]
[TD][/TD]
[TD][/TD]
[TD]example
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]111
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]fred
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]222
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]test2
[/TD]
[TD][/TD]
[TD][/TD]
[TD]apple
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]111
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]james
[/TD]
[TD][/TD]
[TD][/TD]
[TD]bob
[/TD]
[/TR]
</tbody>[/TABLE]
The macro should result in the sheet looking like this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]ID
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Data1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Data2
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]111
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]test
fred
james
[/TD]
[TD][/TD]
[TD][/TD]
[TD]example
bob
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]222[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]test2[/TD]
[TD][/TD]
[TD][/TD]
[TD]apple[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any thoughts would be greatfully <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]-->received.
I have an issue currently that I have overcome with a 3rd party add-on. I am sure there is a way to do this with a macro, however my attempts so far have failed. I am hoping someone can prove the power of VBA and Macros and enable the removal of the 3rd party add-on.
Basically the issue is, where there are several rows (that may not directly follow each other) that have the same data in column A but different data in other columns, there is a combine operation required.
Where two (or more) rows contain an identical value in column A, I want to merge the content of Column H and Column K separated with a new line.
Note: There is a header on row 1 and Column K may not always have a value.
eg:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]ID
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Data1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Data2
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]111
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]test
[/TD]
[TD][/TD]
[TD][/TD]
[TD]example
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]111
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]fred
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]222
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]test2
[/TD]
[TD][/TD]
[TD][/TD]
[TD]apple
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]111
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]james
[/TD]
[TD][/TD]
[TD][/TD]
[TD]bob
[/TD]
[/TR]
</tbody>[/TABLE]
The macro should result in the sheet looking like this:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]ID
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Data1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Data2
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]111
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]test
fred
james
[/TD]
[TD][/TD]
[TD][/TD]
[TD]example
bob
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]222[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]test2[/TD]
[TD][/TD]
[TD][/TD]
[TD]apple[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any thoughts would be greatfully <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]-->received.