Comparing multiple columns in Excel and remove dups -


i have 3 columns in excel 2010 email addresses, need able narrow 3 columns have unique values. don't need merge remaining values single column, need eliminate duplicates. found post had vb it, didn't seem work. removed few duplicates:

sub removeduplicates() dim lastcol integer lastcol = 5    'col 5 column e  dim wks worksheet set wks = worksheets("sheet1")  dim searchrange range set searchrange = wks.range("a1:a" & wks.cells(rows.count, "a").end(xlup).row)  dim comparearray variant dim searcharray variant  'get values col search against comparearray = searchrange.value  col = lastcol - 1 1 step -1     'set values search matches     searcharray = searchrange.offset(0, col - 1).value      'set values last column compare against     comparearray = searchrange.offset(0, col).value      = 1 ubound(comparearray)         if comparearray(i, 1) = searcharray(i, 1)             'match found, delete , shift left             cells(i, col).delete shift:=xltoleft         end if     next  next col end sub 

thanks!

here how propose doing if one-off task don't have often.

rather typing out entire process in detail, have done screencast of how did (and entire process barely took me minute do).

the quick overview:
need add few temporary helper columns unique values each email list (one each list), 'merged list' column , final column. filter unique emails using 'advanced' filter option 1 column @ time. paste values temporary column email list , clear filter. repeat until have gone through each column , each temporary column has unique values in each list. once have uniques each list, paste these 1 @ time 'merged list' column (stacking results in 1 long list) , unique filter on that. copy/paste uniques list final column, clear filter, , you're done.


screencast below:

http://screencast.com/t/zl8vmuut


cheers!


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -