Having tried for hours to work out the solution myself I am throwing in the towel, can anyone please help me out? I will be doing this many times so would like to avoid using pivot table and copy paste from that.
So I am trying to use VBA to go through a document and delete all duplicate rows with a high number
My data looks like this (hundres of rows):
[TABLE="width: 500"]
<tbody>[TR]
[TD]Part Number
[/TD]
[TD]Price
[/TD]
[/TR]
[TR]
[TD]20040
[/TD]
[TD]1500
[/TD]
[/TR]
[TR]
[TD]20038
[/TD]
[TD]1000
[/TD]
[/TR]
[TR]
[TD]20038
[/TD]
[TD]1300
[/TD]
[/TR]
[TR]
[TD]20034
[/TD]
[TD]4000
[/TD]
[/TR]
[TR]
[TD]20040
[/TD]
[TD]3000
[/TD]
[/TR]
[TR]
[TD]20040
[/TD]
[TD]1200
[/TD]
[/TR]
</tbody>[/TABLE]
The macro should then return a document that will look like this: (having deleted all rows with high values on duplicates, but retained low values on duplicates and non-duplicates)
[TABLE="width: 500"]
<tbody>[TR]
[TD]Part Number
[/TD]
[TD]Price
[/TD]
[/TR]
[TR]
[TD]20040
[/TD]
[TD]1200
[/TD]
[/TR]
[TR]
[TD]20038
[/TD]
[TD]1000
[/TD]
[/TR]
[TR]
[TD]20034
[/TD]
[TD]4000
[/TD]
[/TR]
</tbody>[/TABLE]
There must be a way to do this?
So I am trying to use VBA to go through a document and delete all duplicate rows with a high number
My data looks like this (hundres of rows):
[TABLE="width: 500"]
<tbody>[TR]
[TD]Part Number
[/TD]
[TD]Price
[/TD]
[/TR]
[TR]
[TD]20040
[/TD]
[TD]1500
[/TD]
[/TR]
[TR]
[TD]20038
[/TD]
[TD]1000
[/TD]
[/TR]
[TR]
[TD]20038
[/TD]
[TD]1300
[/TD]
[/TR]
[TR]
[TD]20034
[/TD]
[TD]4000
[/TD]
[/TR]
[TR]
[TD]20040
[/TD]
[TD]3000
[/TD]
[/TR]
[TR]
[TD]20040
[/TD]
[TD]1200
[/TD]
[/TR]
</tbody>[/TABLE]
The macro should then return a document that will look like this: (having deleted all rows with high values on duplicates, but retained low values on duplicates and non-duplicates)
[TABLE="width: 500"]
<tbody>[TR]
[TD]Part Number
[/TD]
[TD]Price
[/TD]
[/TR]
[TR]
[TD]20040
[/TD]
[TD]1200
[/TD]
[/TR]
[TR]
[TD]20038
[/TD]
[TD]1000
[/TD]
[/TR]
[TR]
[TD]20034
[/TD]
[TD]4000
[/TD]
[/TR]
</tbody>[/TABLE]
There must be a way to do this?