PC Review


Reply
Thread Tools Rate Thread

how to delete rows based on duplicate information in a column

 
 
albertpinto
Guest
Posts: n/a
 
      26th May 2006

Is there a way (beside writing a macro) to delete if you have identical
entries in a column and you want to keep only one copy of that row. For
e.g.

A B C
1 2 3
1 4 5

Since there are Two 1's in A i only want to keep one copy of that row.

Thanks in advace for help,


--
albertpinto
------------------------------------------------------------------------
albertpinto's Profile: http://www.excelforum.com/member.php...fo&userid=9370
View this thread: http://www.excelforum.com/showthread...hreadid=546032

 
Reply With Quote
 
 
 
 
Paul Lautman
Guest
Posts: n/a
 
      26th May 2006
albertpinto wrote:
> Is there a way (beside writing a macro) to delete if you have
> identical entries in a column and you want to keep only one copy of
> that row. For e.g.
>
> A B C
> 1 2 3
> 1 4 5
>
> Since there are Two 1's in A i only want to keep one copy of that row.
>
> Thanks in advace for help,


Data->Advanced filter has an option for removing duplicates


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      26th May 2006
With headers in Row 1, you can use Data|Filter|Advanced filter to show just the
unique entries.

Debra Dalgleish shows how:
http://www.contextures.com/xladvfilter01.html#FilterUR

Do this based on just column A.

Then you can select your range (all columns)
edit|copy
and edit|paste to a new location (a new sheet?)

Only the visible cells should be copied|Pasted.

albertpinto wrote:
>
> Is there a way (beside writing a macro) to delete if you have identical
> entries in a column and you want to keep only one copy of that row. For
> e.g.
>
> A B C
> 1 2 3
> 1 4 5
>
> Since there are Two 1's in A i only want to keep one copy of that row.
>
> Thanks in advace for help,
>
> --
> albertpinto
> ------------------------------------------------------------------------
> albertpinto's Profile: http://www.excelforum.com/member.php...fo&userid=9370
> View this thread: http://www.excelforum.com/showthread...hreadid=546032


--

Dave Peterson
 
Reply With Quote
 
bob.elliott@aks-labs.com
Guest
Posts: n/a
 
      26th May 2006
Try this freeware:
http://www.aks-labs.com/support/phpB...topic.php?t=69
This is not Excel plug-in, but works for duplicates finding

 
Reply With Quote
 
JB
Guest
Posts: n/a
 
      27th May 2006
We assume number sorted in column A:

Range("A1").Select
Do While ActiveCell <> ""
If ActiveCell = ActiveCell.Offset(-1, 0) Then
ActiveCell.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop

Cordialy JB

 
Reply With Quote
 
aresen
Guest
Posts: n/a
 
      29th May 2006
The unique record implementation will yield the first occurrence of
each value in the list. That's fine if it's the first you want.
However, in some cases the last occurrence is more valid since data is
usually added to the end of a list and is the most recent.
Let's say the last row of data is 100. To extract the last occurrence,
select cells D2 and enter the formula =MATCH(A2,A3:A$101,0). Copy that
down through to cell D100. You will get numbers and #N/A. Now select
column D and use Edit... Go To... Special... Select Formulas but
deselect Errors then hit OK. Now Edit... Delete... Entire Row. Now you
can delete the formulas left in column D. Conversely, if the formula is
=MATCH(A2,A$1:A1,0) and then copied down, you'll be retaining the first
instances.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Evaluate duplicate rows and delete information in specified columns S Himmelrich Microsoft Excel Programming 1 11th Sep 2008 06:31 AM
Delete rows with duplicate information Ixtreme Microsoft Excel Programming 5 18th Aug 2007 02:06 PM
remove duplicate rows based on one column =?Utf-8?B?c3RlcGhlbnNvbjIy?= Microsoft Access Queries 2 6th Oct 2006 12:33 PM
Convert columns to rows: create duplicate rows based on column val =?Utf-8?B?Q2FycmllUg==?= Microsoft Access 3 30th Aug 2006 07:07 PM
duplicate rows in a table based on the value in a column =?Utf-8?B?Ym9va3dvcm0=?= Microsoft Access 4 9th Oct 2005 11:59 PM


Features
 

Advertising
 

Newsgroups
 


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