PC Review


Reply
Thread Tools Rate Thread

Delete Row if column has duplicate value

 
 
xjvs
Guest
Posts: n/a
 
      6th Sep 2007
I am looking for a way to delete an entire row of data if column B has a
duplicate value (the entire row of data will be different)
In the example below I want to keep the first version of data and delete all
duplicates that appear after.
Delete Row's 5 & 8 (duplicate ID No 99)
Delete Row 7 (duplicate ID No 49)

A B C D
1Junk ID No Junk Junk
2 xxx 99 yyy zzz
3 aaa 49 yyy bbb
4 xxx 65 yyy zzz
5 xyz 99 123 abc
6 xxx 87 yyy zzz
7 xxx 49 yyy zzz
8 123 99 qwe fgh
9


Appreciate any thoughts or suggestions

Thanks!
xjvs

 
Reply With Quote
 
 
 
 
MartinW
Guest
Posts: n/a
 
      6th Sep 2007
Hi xjvs,

One way,
Put this into cell E3 and drag down to the end of your data
=IF(COUNTIF($B$2:B3,B3)>1,1,"")
This will return a 1 in any row that is a duplicate

Then select A1 to E1 and goto Data>Autofilter
On the E1 dropdown select 1
Delete all the filtered rows
Turn Autofilter off and you should be done

HTH
Martin

"xjvs" <(E-Mail Removed)> wrote in message
news:uhb8$(E-Mail Removed)...
>I am looking for a way to delete an entire row of data if column B has a
>duplicate value (the entire row of data will be different)
> In the example below I want to keep the first version of data and delete
> all duplicates that appear after.
> Delete Row's 5 & 8 (duplicate ID No 99)
> Delete Row 7 (duplicate ID No 49)
>
> A B C D
> 1Junk ID No Junk Junk
> 2 xxx 99 yyy zzz
> 3 aaa 49 yyy bbb
> 4 xxx 65 yyy zzz
> 5 xyz 99 123 abc
> 6 xxx 87 yyy zzz
> 7 xxx 49 yyy zzz
> 8 123 99 qwe fgh
> 9
>
>
> Appreciate any thoughts or suggestions
>
> Thanks!
> xjvs



 
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
VBA to delete Duplicate Records (1 column), before which, non-duplicate data merged into remaining row EagleOne@discussions.microsoft.com Microsoft Excel Programming 6 20th Aug 2009 02:40 AM
delete a duplicate in column while leaving other duplicates daphoenix Microsoft Excel Worksheet Functions 1 25th Jun 2008 04:15 PM
Delete row where there is duplicate data in Column E =?Utf-8?B?U0lUQ0ZhblRO?= Microsoft Excel New Users 1 4th Jun 2006 09:35 AM
delete duplicate names in a column jaya Microsoft Excel New Users 1 21st Oct 2005 09:53 AM
Is there a quick way to delete all duplicate rows in a column? =?Utf-8?B?SmVsbGFieQ==?= Microsoft Excel Misc 3 16th May 2005 10:47 PM


Features
 

Advertising
 

Newsgroups
 


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