Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default deleting duplicates

I have a column of information that contains a list of
numbers. some of these numbers are duplicated and i want
to eliminate them. I sorted these numbers and then used
the =AND(H9=H10) to see which were duplicated (represented
as true). Is there a way to just go through and delete
the rows that are marked as true? Thanks a lot
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default deleting duplicates

The following will test the contents of the first 100 rows of Column B if it
is true then the row is deleted.

Public Sub dedupe()
Dim vx As Long
For vx = 1 To 100
If Worksheets("Sheet1").Cells(vx, 1).Value Then Range("A" &
vx).EntireRow.Delete
Next vx
End Sub

" wrote in message
...
I have a column of information that contains a list of
numbers. some of these numbers are duplicated and i want
to eliminate them. I sorted these numbers and then used
the =AND(H9=H10) to see which were duplicated (represented
as true). Is there a way to just go through and delete
the rows that are marked as true? Thanks a lot





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default deleting duplicates

use a datafilter (Data=Filter=Autofilter) on the column to show the True
rows, select the data and do Edit=Delete (entire row). Only the visible
rows will be deleted (don't select the header row). Now turn off the
autofilter (Data=Filter=Autofilter)
--
Regards,
Tom Ogilvy
" wrote in message
...
I have a column of information that contains a list of
numbers. some of these numbers are duplicated and i want
to eliminate them. I sorted these numbers and then used
the =AND(H9=H10) to see which were duplicated (represented
as true). Is there a way to just go through and delete
the rows that are marked as true? Thanks a lot



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default deleting duplicates

That misses some rows in cases where contiguous rows are both/all true

It is best to loop from highest to lowest in reverse

Public Sub dedupe()
Dim vx As Long
For vx = 100 To 1 Step -1
If Worksheets("Sheet1").Cells(vx, 1).Value Then Range("A" & _
vx).EntireRow.Delete
Next vx
End Sub


--
Regards
Tom Ogilvy

"Nigel" wrote in message
...
The following will test the contents of the first 100 rows of Column B if

it
is true then the row is deleted.

Public Sub dedupe()
Dim vx As Long
For vx = 1 To 100
If Worksheets("Sheet1").Cells(vx, 1).Value Then Range("A" &
vx).EntireRow.Delete
Next vx
End Sub

" wrote in message
...
I have a column of information that contains a list of
numbers. some of these numbers are duplicated and i want
to eliminate them. I sorted these numbers and then used
the =AND(H9=H10) to see which were duplicated (represented
as true). Is there a way to just go through and delete
the rows that are marked as true? Thanks a lot





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet

News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000

Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption

=---


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
Deleting Duplicates Angie M. Excel Worksheet Functions 2 February 4th 10 03:55 PM
Deleting Duplicates Philip Drury Excel Discussion (Misc queries) 1 October 3rd 07 06:26 PM
Deleting Duplicates Jane Excel Discussion (Misc queries) 3 August 17th 07 02:58 AM
Deleting duplicates katana Excel Discussion (Misc queries) 4 February 7th 06 06:33 PM
Deleting the first row of two duplicates. Georgyneedshelp Excel Discussion (Misc queries) 2 October 19th 05 04:44 PM


All times are GMT +1. The time now is 04:16 PM.

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

About Us

"It's about Microsoft Excel"