eliminate the same value

kayza

Board Regular
Joined
Apr 29, 2015
Messages
61
Office Version
  1. 2007
Platform
  1. Windows
hi all
I'm trying to build a macro which has some function to eliminate the same value based on column. and here is my sample data
[TABLE="class: grid, width: 200, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]one[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]one[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]two[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]two[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]one[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]three[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]three[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]two[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]four[/TD]
[/TR]
</tbody>[/TABLE]


the result i want to display is like this
[TABLE="class: grid, width: 200, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]one[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]two[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]three[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]four[/TD]
[/TR]
</tbody>[/TABLE]


thanks in advance
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I don't understand which duplicates you want cleared. For "one" and "four", you kept the first appearance, but for "two" you kept the middle appearance and for "three" you kept the last appearance... there does not appear to be any consistency to the duplicates that are being cleared.
 
Upvote 0
Thanks for the correction.
do you think, is it possible to be done by sorting the data first before eliminating te same value.t


thanks in advance.
 
Upvote 0
Thanks for the correction.
do you think, is it possible to be done by sorting the data first before eliminating te same value.t
I have no idea... this is your data, I have no idea what your requirements or intentions are for it. All I was pointing out is there is no discernable pattern to which duplicates are being eliminated based on the before/after layout that you showed. If you wanted to keep the first occurrence and eliminate all the rest... that could be coded for, same for keeping just the last, but your eliminations appear to have no pattern behind them. You need to come up with a rule for what you want to keep and tell it to us, then we can code a solution for it.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top