HOW DO I REMOVE UNIQUE VALUES IN EXCEL?

  • Thread starter Thread starter andy
  • Start date Start date
No, you can remove the duplicate ones, then you are left with the unique
ones and an move those wherever you want. In all other cases you would need
to use a filter

--


Regards,


Peo Sjoblom
 
Let's say we have a list of entries in column A and want to remove the unique
ones. Enter and run this macro:

Sub dropum()
n = Cells(Rows.Count, "A").End(xlUp).Row
For i = n To 1 Step -1
v = Cells(i, 1).Value
k = Application.WorksheetFunction.CountIf(Range("A:A"), v)
'MsgBox (v & " " & k)
If k = 1 Then
Cells(i, 1).Delete
End If
Next
End Sub
 
Try this:

=IF(ISERR(SMALL(IF(COUNTIF(Rng,Rng)>1,ROW(INDIRECT("1:"&ROWS(Rng)))),ROWS($1:1))),"",INDEX(Rng,SMALL(IF(COUNTIF(Rng,Rng)>1,ROW(INDIRECT("1:"&ROWS(Rng)))),ROWS($1:1))))

ctrl+shift+enter, not just enter
copy down as far as needed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top