excel vba - For all unique cells in a row, delete rows -


i need delete rows cells in column "e" unique, have "non-unique" cells in column i.e column "e" has duplicates.

i have been searching code have found little.

sorry cant post snip-it start off with.

thanks

give try:

sub removeuniques()     dim e range, rdel range, r range, n long     n = cells(rows.count, "e").end(xlup).row     set e = range("e1:e" & n)     dim wf worksheetfunction     set wf = application.worksheetfunction     set rdel = nothing     each r in e         v = r.value         if wf.countif(e, v) = 1             if rdel nothing                 set rdel = r             else                 set rdel = union(rdel, r)             end if         end if     next r      if not rdel nothing         rdel.entirerow.delete     end if end sub 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -