Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Delete Row if column has duplicate value

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 860
Default Delete Row if column has duplicate value

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 DataAutofilter
On the E1 dropdown select 1
Delete all the filtered rows
Turn Autofilter off and you should be done

HTH
Martin

"xjvs" wrote in message
...
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
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
Delete row where there is duplicate data in Column E SITCFanTN New Users to Excel 1 June 4th 06 09:35 AM
delete duplicate record but only determine 1 column data AskExcel Excel Worksheet Functions 3 January 28th 06 01:11 PM
delete duplicate names in a column jaya New Users to Excel 1 October 21st 05 09:53 AM
Is there a quick way to delete all duplicate rows in a column? Jellaby Excel Discussion (Misc queries) 3 May 16th 05 10:47 PM
I want to delete rows with duplicate entries within one column. kini olegario Excel Discussion (Misc queries) 1 January 15th 05 01:44 AM


All times are GMT +1. The time now is 09:56 AM.

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"