Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing duplicate entries

Status
Not open for further replies.

pmcmicha

Technical User
May 25, 2000
353
I have an excel file that has some duplicate entries in COL A with various values in COL B and COL C. What I would like to do is to remove all duplicate values in COL A so that they are unique, but at the same time, keep the values in COL B and COL C so that they all appear in the same row.

I don't know VBA that well and I don't think that the 'CONSOLIDATE' option under 'DATA' is going to help. Here is an example:

ROW COL A COL B COL C
1 831 29 ""
2 831 11842 ""
3 831 "" 580

In this example, I would want ROW 3 to be removed, but I want the value in C3 to be copied up into CELLS (C1, C2). This would have to work for both COL C and COL B since it is unorganized data. The "" is a NULL value.

Any help is appreciated, thanks in advance.
 
Hi,

Sort col C descending

enter formula in Col D and copy down
[tt]
=IF(ISBLANK(C2),D1,C2)
[/tt]
copy column D, edit/paste special-values in column C

sort on column B and delete rows with null in col B

VOLA!

Skip,

[glasses] [red]Be advised:[/red] The dyslexic, agnostic, insomniac, lays awake all night wondering...
"Is there really a DOG?" [tongue]
 
This might work if I only had 100 or so rows in my spreadsheet, but I have some 20000+ rows with roughly one-quarter of those having duplicate entries. I need something which will parse through these records and remove what I don't need without user intervention.

Anyone have any ideas? Thanks.
 


Try using your macro recorder.

Skip,

[glasses] [red]Be advised:[/red] The dyslexic, agnostic, insomniac, lays awake all night wondering...
"Is there really a DOG?" [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top