Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
J. Gutierrez
 
Posts: n/a
Default Deleting duplicate entries

Hi everyone,

I have a list with several thousand numbers (cancer morphology codes, many
repeats) with their corresponding text name in the adjacent column. How can I
delete all the repeats in the worksheet and be left with one of each number?

Example...This is what I have now (no header column, data sorted by Column
A, ascending values)

A B
1 8001 xxxxxx
2 8001 xxxxxx
3 8002 yyyyyy
4 8002 yyyyyy
5 8002 yyyyyy
6 8003 zzzzzz
7 8003 zzzzzz

and this is what I would like to end up with...

A B
1 8001 xxxxxx
2 8002 yyyyyy
3 8003 zzzzzz

Any suggestions?

Thanks for everyones help.

JG
  #2   Report Post  
Michael
 
Posts: n/a
Default Deleting duplicate entries

Hi J. Try out Chip Pearson's site: http://www.cpearson.com/excel/duplicat.htm
--
Sincerely, Michael Colvin


"J. Gutierrez" wrote:

Hi everyone,

I have a list with several thousand numbers (cancer morphology codes, many
repeats) with their corresponding text name in the adjacent column. How can I
delete all the repeats in the worksheet and be left with one of each number?

Example...This is what I have now (no header column, data sorted by Column
A, ascending values)

A B
1 8001 xxxxxx
2 8001 xxxxxx
3 8002 yyyyyy
4 8002 yyyyyy
5 8002 yyyyyy
6 8003 zzzzzz
7 8003 zzzzzz

and this is what I would like to end up with...

A B
1 8001 xxxxxx
2 8002 yyyyyy
3 8003 zzzzzz

Any suggestions?

Thanks for everyones help.

JG

  #3   Report Post  
Nikki
 
Posts: n/a
Default Deleting duplicate entries

you can also create a Pivot table to elimiate the duplicates.

"J. Gutierrez" wrote:

Hi everyone,

I have a list with several thousand numbers (cancer morphology codes, many
repeats) with their corresponding text name in the adjacent column. How can I
delete all the repeats in the worksheet and be left with one of each number?

Example...This is what I have now (no header column, data sorted by Column
A, ascending values)

A B
1 8001 xxxxxx
2 8001 xxxxxx
3 8002 yyyyyy
4 8002 yyyyyy
5 8002 yyyyyy
6 8003 zzzzzz
7 8003 zzzzzz

and this is what I would like to end up with...

A B
1 8001 xxxxxx
2 8002 yyyyyy
3 8003 zzzzzz

Any suggestions?

Thanks for everyones help.

JG

  #4   Report Post  
grahammal
 
Posts: n/a
Default Deleting duplicate entries


Try this for size, works for me.

For uY = 1 To 6 'Spin thru 6 times to get them all
Qq = Application.CountA(ActiveSheet.Range("B:B")) 'Get row count before
beginning
For oZ = 2 To Qq 'Main loop
If Cells(oZ, 1) = Cells(oZ - 1, 1) Then 'Check for dups
Cells(oZ, 1).Select 'Select the cell
Selection.Delete Shift:=xlUp 'Delete
Qq = Qq - 1 'Change loop criteria because cell gone
End If 'End
Next oZ 'Inside loop
Next uY 'Outside loop


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=481963

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 All Rows for Duplicate Entries Except Those With Most Items In Row foofoo Excel Discussion (Misc queries) 1 October 22nd 05 02:49 AM
Deleting duplicate entries in an Excel list ticephotos Excel Worksheet Functions 5 May 3rd 05 08:44 PM
Deleting duplicate entries in Excel list ticephotos Excel Discussion (Misc queries) 2 May 3rd 05 06:22 PM
count duplicate (or, inversely, unique) entries, but based on a condition markx Excel Worksheet Functions 3 March 8th 05 06:57 PM
Deleting BOTH duplicate entries Julian Excel Discussion (Misc queries) 2 March 7th 05 11:54 PM


All times are GMT +1. The time now is 02:48 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"