Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How am I able to del duplicate lines automatically

I need to clean up/separate information from file that contains more that
100.000 rows. There is cells that contains same information, and I want to
move all rows within same information in different location than unique rows.
Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default How am I able to del duplicate lines automatically

Use Advanced Filter under Data Filter Advanced Filter, then check box for
'Unique Records Only'.


Alternatively, you can run this macro, after you have sorted all the columns
(in the case I am giving you, it is Column A that is checked for
dupes...change to suit your needs):

Sub CheckForDupes()

Dim RowNdx As Long
Dim ColNum As Integer
ColNum = Selection(1).Column 'set number to match the proper column
For RowNdx = Selection(Selection.Cells.Count).Row To _
Selection(1).Row + 1 Step -1
If Cells(RowNdx, ColNum).Value = Cells(RowNdx - 1, ColNum).Value Then
Cells(RowNdx, ColNum).Delete shift:=xlUp
End If
Next RowNdx
End Sub

Regards,
Ryan---

--
RyGuy


"Kupa72" wrote:

I need to clean up/separate information from file that contains more that
100.000 rows. There is cells that contains same information, and I want to
move all rows within same information in different location than unique rows.
Any ideas?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically duplicate variables Dina Excel Worksheet Functions 2 June 13th 07 04:41 PM
How do you suppress duplicate lines? LindaCC Excel Worksheet Functions 4 August 25th 06 07:13 PM
Automatically number lines aletoconstco Excel Worksheet Functions 3 June 12th 06 05:01 PM
DELETE DUPLICATE DATA IN A SHEET AUTOMATICALLY Sony Manoj Excel Discussion (Misc queries) 1 November 20th 05 08:39 AM
How can I automatically remove duplicate data within a column? MECG Excel Discussion (Misc queries) 1 June 1st 05 12:22 AM


All times are GMT +1. The time now is 07:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"