Extracting the Duplicate Records

S

Santhosh

How can i extract the duplicate data from a excel sheet which has 5000 to
6000 records...

currently i have planned to write the code using macros in the following way

dim duprecords()
rowc=1
do while not isempty(cells(rowc,1))
rowc1 = rowc + 1
do while not isempty(cells(rowc1,1))
if cellls(rowc,1).value = cells(roc1,1).value then
cells(rowc1,1).entirerow.delete
else
rowc1 = rowc1 +1
end if
loop
rowc = rowc +1
loop
end sub

is this procedure will work fast and efficient. Suggest me if there any
alternative for this...

Thanks in advance
Santhosh
 
J

Jim Rech

Just use Data, Filter, Advanced Filter. Select the copy to another location
option and delete duplicates. Then you'll have a copy of the original list
minus duplicates.

--
Jim
| How can i extract the duplicate data from a excel sheet which has 5000 to
| 6000 records...
|
| currently i have planned to write the code using macros in the following
way
|
| dim duprecords()
| rowc=1
| do while not isempty(cells(rowc,1))
| rowc1 = rowc + 1
| do while not isempty(cells(rowc1,1))
| if cellls(rowc,1).value = cells(roc1,1).value then
| cells(rowc1,1).entirerow.delete
| else
| rowc1 = rowc1 +1
| end if
| loop
| rowc = rowc +1
| loop
| end sub
|
| is this procedure will work fast and efficient. Suggest me if there any
| alternative for this...
|
| Thanks in advance
| Santhosh
 
Top