Hello,
I am looking for a VBA macro doing a specific job for which I am a bit struggling to code.
I have a table where there is a string of characters in a column (essentially codes or references), and then I find them again later in another column (here C), sometimes in disorder :
[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Components codes[/TD]
[TD]Characteristics of the product[/TD]
[/TR]
[TR]
[TD]Product 1[/TD]
[TD]8002, 75410, 1221,[/TD]
[TD]8002, 75410 and 1221, small, blue color[/TD]
[/TR]
[TR]
[TD]Product 2[/TD]
[TD]3326, 84164, 2114, 1459[/TD]
[TD]3326, 84164, 1459, 2114 and only for export[/TD]
[/TR]
[TR]
[TD]Product 3[/TD]
[TD]7456, 4362[/TD]
[TD]7456, 4362, medium size, yellow, high quality certification[/TD]
[/TR]
</tbody>[/TABLE]
See the recurrence ?
So I would like to delete all the references appearing in column C because it is already populated in column B ... but without deleting the other characteristics.
My basic idea was taking one by one the codes (always separated by a comma) and then compare if it is present in Column C. If it is true, deleting the code in this Column C. And repeating this for every code in the cell and then every line.
But I don't know how to isolate in VBA the references that are in column B (the length of characters for the code is variable :/ )
Is it possible to have some help ?
Thank you
I am looking for a VBA macro doing a specific job for which I am a bit struggling to code.
I have a table where there is a string of characters in a column (essentially codes or references), and then I find them again later in another column (here C), sometimes in disorder :
[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Components codes[/TD]
[TD]Characteristics of the product[/TD]
[/TR]
[TR]
[TD]Product 1[/TD]
[TD]8002, 75410, 1221,[/TD]
[TD]8002, 75410 and 1221, small, blue color[/TD]
[/TR]
[TR]
[TD]Product 2[/TD]
[TD]3326, 84164, 2114, 1459[/TD]
[TD]3326, 84164, 1459, 2114 and only for export[/TD]
[/TR]
[TR]
[TD]Product 3[/TD]
[TD]7456, 4362[/TD]
[TD]7456, 4362, medium size, yellow, high quality certification[/TD]
[/TR]
</tbody>[/TABLE]
See the recurrence ?
So I would like to delete all the references appearing in column C because it is already populated in column B ... but without deleting the other characteristics.
My basic idea was taking one by one the codes (always separated by a comma) and then compare if it is present in Column C. If it is true, deleting the code in this Column C. And repeating this for every code in the cell and then every line.
But I don't know how to isolate in VBA the references that are in column B (the length of characters for the code is variable :/ )
Is it possible to have some help ?
Thank you