From: RK on 16 Mar 2010 17:31 How do you delete unique values in a column? I need to filter 7500+ rows to only display duplicate values.
From: מיכאל (מיקי) אבידן on 16 Mar 2010 18:07 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 16 Mar 2010 18:08 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 17 Mar 2010 08:15 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.
|
Pages: 1 Prev: MS Word Next: How do you paste a list of bulleted text from a word doc. into exc |