From: RK on
How do you delete unique values in a column? I need to filter 7500+ rows to
only display duplicate values.
From: מיכאל (מיקי) אבידן on
The VBA code below will delete the entire row when the value in col. "A" will
be uniqe.
Consider to make a copy of your entire sheet in order to test the code and
see if this is what you need.
-------------------------------
Sub Delete_Uniques()
LR = Cells(Rows.Count, 1).End(xlUp).Row
For R = LR To 1 Step -1
If Application.CountIf(Range("A:A"), Cells(R, 1)) = 1 Then
Cells(R, 1).EntireRow.Delete
End If
Next
End Sub
---------------------
If you don't want to delete rows and instead only to delete the unique
values -
then change the command:
Cells(R, 1).EntireRow.Delete into: Cells(R, 1) = ""
Micky


"RK" wrote:

> How do you delete unique values in a column? I need to filter 7500+ rows to
> only display duplicate values.
From: מיכאל (מיקי) אבידן on
The code assumes the column is col. "A"
Micky


"RK" wrote:

> How do you delete unique values in a column? I need to filter 7500+ rows to
> only display duplicate values.
From: RK on
Is there any way of tweaking this code so that the first instance of the
duplicates are
removed as well? IE: Display 2 duplicate cells even though there are 3
instances of the value

Thanks.

"מיכאל (מיקי) אבידן" wrote:

> The code assumes the column is col. "A"
> Micky
>
>
> "RK" wrote:
>
> > How do you delete unique values in a column? I need to filter 7500+ rows to
> > only display duplicate values.