Removing duplicates

Dr Dee

Board Regular
Joined
Sep 19, 2008
Messages
69
Hey guys,
haven't been here for a while, guess I'm improving at this Excel stuff, eh? :)
I do have an issue I've been battling with - I've got a column of names (Surname, Initial) that is an amalgamation from three different sheets. I go to "Remove Duplicates", but keep getting the message "No duplicate values found".
There clearly are duplicates (to the eye) but obviously there is some sort of formatting issue (I think) that's not getting me where I want.
I know you guys are gonna make me look like a goose...again :stickouttounge: but I'm sure I will learn some more of this intriguing app.

Thanks,
Den
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Try the countif first, and here you see Fred is showing twice but only shows as 1 with the countif
Excel Workbook
DE
14Fred 1
15Ronnie3
16Archie1
17Mitch2
18Ronnie3
19Mitch2
20Fred1
21Ronnie3
22sam1
23edward1
Sheet2
Excel 2010
Cell Formulas
RangeFormula
E14=COUNTIF($D$14:$D$23,D14)
E15=COUNTIF($D$14:$D$23,D15)
E16=COUNTIF($D$14:$D$23,D16)
E17=COUNTIF($D$14:$D$23,D17)
E18=COUNTIF($D$14:$D$23,D18)
E19=COUNTIF($D$14:$D$23,D19)
E20=COUNTIF($D$14:$D$23,D20)
E21=COUNTIF($D$14:$D$23,D21)
E22=COUNTIF($D$14:$D$23,D22)
E23=COUNTIF($D$14:$D$23,D23)


which is because one of the Freds has extra spaces. use the Trim function to make sure you have no leading or trailing spaces
Excel Workbook
F
13After Trim
14Fred
15Ronnie
16Archie
17Mitch
18Ronnie
19Mitch
20Fred
21Ronnie
22sam
23edward
Sheet2
Excel 2010
Cell Formulas
RangeFormula
F14=TRIM(D14)

then try the Advanced Filter and copy unique records only
Excel Workbook
G
13Adv Filter Result
14After Trim
15Fred
16Ronnie
17Archie
18Mitch
19sam
20edward
Sheet2
Excel 2010
 
Upvote 0
Excellent stuff, Scotty, I guess there must have been trailling spaces..obviously I couldn't see these, but at least I have some more insight into 'why' sometimes the obvious isn't so obvious; often so common with Excel.
Thanks mate....
 
Upvote 0
Try and Trim(strings) - will remove spaces in beginning and end - also use
Option Compare Text in declaration of your code - this will make string comparisons case insensetive - just some ideas - good luck
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,547
Members
452,925
Latest member
duyvmex

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top