The Code Cage - Microsoft Office help Free Microsoft Office Help for all Applications!  

To stop seeing these ads and get other benefits check This page!

Go Back   The Code Cage Forums > Newsgroups - Microsoft Topics > Newsgroup - Excel Forum > Excel Miscellaneous


Excel Miscellaneous Post questions in this forum if they are related to using Microsoft Excel that doesn't quite fit in any other category e.g quirks, Formulae or built in functionality etc.

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 7th July 2009, 05:29 PM
habelow1
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Default [SOLVED]: concatenate 2 columns (A2+B2) and compare for duplicates

------ Register to get rid of these "In Post" ads! ------


I have 2 columns (First Name, Last Name) that I need to see if there are any
duplicates in the spreadsheet, and to flag them.
John Smith <----Duplicate
Jane Smith
John H Smith
John Smith <---- Duplicate

Thanks


Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
  #2 (permalink)  
Old 7th July 2009, 05:48 PM
Luke M
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Default RE: concatenate 2 columns (A2+B2) and compare for duplicates

------ Register to get rid of these "In Post" ads! ------


Easiest with 2 helper columns.
First helper (column C):
=A2&B2
Second helper:
=IF(COUNTIF(C:C,C2)>1,"DUPLICATE","")

Copy down as needed.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"habelow1" wrote:

> I have 2 columns (First Name, Last Name) that I need to see if there are any
> duplicates in the spreadsheet, and to flag them.
> John Smith <----Duplicate
> Jane Smith
> John H Smith
> John Smith <---- Duplicate
>
> Thanks



Did you find this post helpful? Yes | No
  #3 (permalink)  
Old 7th July 2009, 05:50 PM
Jacob Skaria
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Default RE: concatenate 2 columns (A2+B2) and compare for duplicates

------ Register to get rid of these "In Post" ads! ------


Try the below formula in C1; and copy that down as required

=IF(SUMPRODUCT(--($A$1:$A$100=A1),--($B$1:$B$100=B1))>1,"Duplicate","")

If this post helps click Yes
---------------
Jacob Skaria


"habelow1" wrote:

> I have 2 columns (First Name, Last Name) that I need to see if there are any
> duplicates in the spreadsheet, and to flag them.
> John Smith <----Duplicate
> Jane Smith
> John H Smith
> John Smith <---- Duplicate
>
> Thanks



Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
  #4 (permalink)  
Old 7th July 2009, 05:50 PM
Steven
Newsgroup Contributor


My Top Tip Count:

 
Posts: n/a
Default Re: concatenate 2 columns (A2+B2) and compare for duplicates

------ Register to get rid of these "In Post" ads! ------



In two steps

Concatenate cells A and B in column C through formula Concatenate
(A1,B1)

and drag down

In column D (the flag column)

=IF(COUNTIF(C:C,C1)>1,"duplicate","")

and drag down



Did you find this post helpful? Yes | No
The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!
Closed Thread

Bookmarks

Tags
columns, compare, concatenate, duplicates

New topics in Excel Miscellaneous


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

The Code Cage Affilliates


To stop seeing these ads and get other benefits check This page!



All times are GMT +1. The time now is 02:07 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2
No part of this board may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application the represent