Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 7
Default Removing duplicate rows

I have inherited a spreadsheet which has lots of duplicated rows. However,
some information is missing for certain fields. For example one row will
list:
Firstname (Jim), Lastname (Jones), Phone (1213111) and the duplicate will
just have say the Firstname (Jim) & Lastname (Jones).

What I would like to do is remove the second record from the spread sheet.
There are many instances of this throughout.
Is there a way that this can be achieved?

Thanks for any help


  #2   Report Post  
Posted to microsoft.public.excel.newusers
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Removing duplicate rows

You could use a helper column to do a counta of all the active cells in each
row, and then sort and delete all rows that have only two cells
occupied........

Vaya con Dios,
Chuck, CABGx3




"Roger Bell" wrote:

I have inherited a spreadsheet which has lots of duplicated rows. However,
some information is missing for certain fields. For example one row will
list:
Firstname (Jim), Lastname (Jones), Phone (1213111) and the duplicate will
just have say the Firstname (Jim) & Lastname (Jones).

What I would like to do is remove the second record from the spread sheet.
There are many instances of this throughout.
Is there a way that this can be achieved?

Thanks for any help


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,073
Default Removing duplicate rows

On Jan 4, 9:29 pm, Roger Bell
wrote:
I have inherited a spreadsheet which has lots of duplicated rows. However,
some information is missing for certain fields. For example one row will
list:
Firstname (Jim), Lastname (Jones), Phone (1213111) and the duplicate will
just have say the Firstname (Jim) & Lastname (Jones).

What I would like to do is remove the second record from the spread sheet.
There are many instances of this throughout.
Is there a way that this can be achieved?

Thanks for any help


If Firstname is in column A, Lastname is in column B and Phone is in
column C, and assuming that the combination of First and Last Names is
enough to identify a unique record, then the following formula in the
second row of a spare column will return either Keep" or "Delete"...

=IF(OR(SUMPRODUCT(--($A$2:$A$10000=A2),--($B$2:$B
$10000=B2))=1,AND(SUMPRODUCT(--($A$2:$A$10000=A2),--($B$2:$B
$10000=B2))1,COUNTA($A2:$C2)=3)),"Keep","Delete")

Fill this formula down to the last row of data (increase the 10000s if
data goes beyond row 10000)
It returns "Keep" in rows where there is a record that is unique or
there is a record that has been duplicated and contains information in
all three columns.
It returns "Delete" in rows where it is a duplicate of combined First
and Last names and the phone number is missing.
You could then use autofilter to hide the rows with "Delete" in that
column then copy the "Keep" rows.

Changes would need to be made to the formula if there are more than 3
fields, eg if there are 6 fields then the...

COUNTA($A2:$C2)=3 would need to be changed to...

COUNTA($A2:$F2)=6


Ken Johnson
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
Removing duplicate rows Jase4now Excel Discussion (Misc queries) 3 October 24th 07 09:42 PM
removing duplicate rows exceluser2 Excel Discussion (Misc queries) 1 March 2nd 06 09:01 AM
removing duplicate rows exceluser2 Excel Discussion (Misc queries) 3 March 2nd 06 01:51 AM
Removing Duplicate Rows bvinternet Excel Discussion (Misc queries) 1 July 23rd 05 09:26 PM
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns foofoo Excel Discussion (Misc queries) 1 April 2nd 05 12:02 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"