Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default concatenate 2 columns (A2+B2) and compare for duplicates

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default concatenate 2 columns (A2+B2) and compare for duplicates

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default concatenate 2 columns (A2+B2) and compare for duplicates

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default concatenate 2 columns (A2+B2) and compare for duplicates


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

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
Compare 2 columns and align duplicates into same row AGOLFA Excel Worksheet Functions 8 November 9th 09 07:48 PM
Compare columns for duplicates acab New Users to Excel 2 October 3rd 08 08:14 AM
Compare columns remove duplicates Tommy Geek Excel Discussion (Misc queries) 1 December 21st 06 06:42 PM
Compare the 1st 9 digits in two columns looking for duplicates Sweetetc Excel Worksheet Functions 9 March 26th 06 11:58 PM
compare two columns and remove duplicates Moni39 Excel Worksheet Functions 3 May 5th 05 06:08 PM


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