vba - Easiest Way to Find and Remove Duplicates? -
i have 2 columns filled data in excel spreadsheet:
column 1: b c d column 2: c d e f g desired data: a,b,c,d,e,f,g (not a,b,c,d,c,d,e,f,g)
i want combine 2 columns, , remove duplicates. i'm coming c# word, understanding of vba limited. know create array dimension of dimension(column1)+dimension(column2), duplicate removal (is there 1 built in?), or that.
any guidance appreciated, thanks!
use following processing...and call other function or subroutine.
sub removedupes() 'add column, "a" becomes "b" columns(1).entirecolumn.insert 'filter out duplicates , copy unique list "a" range("b1", range("b65536").end(xlup)).advancedfilter _ action:=xlfiltercopy, copytorange:=range("a1"), unique:=true 'add column, "b" becomes "a" columns(2).entirecolumn.delete end sub
then join , sort results each column :)
Comments
Post a Comment