Comparing Columns of names

StuartE

New Member
Joined
Oct 11, 2024
Messages
4
Office Version
  1. 2019
Platform
  1. Windows
I have two sources of data that contain a name field and i need to compare them both to identify any missing data from either set. I've run a match formula which works well across both sets and i have now generated a list of differences between the two lists. However this has highlighted that some names are in different formats in the two tables and i want to be able to exclude these to get a true list of missing data from either source.

Different formats include names with and without titles, middle names included, middle initials etc
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I have two sources of data that contain a name field and i need to compare them both to identify any missing data from either set. I've run a match formula which works well across both sets and i have now generated a list of differences between the two lists. However this has highlighted that some names are in different formats in the two tables and i want to be able to exclude these to get a true list of missing data from either source.

Different formats include names with and without titles, middle names included, middle initials etc
Everyone has own imagination which can be different from person to person. If you provide sample data, you'd probably get quicker response. ;)
 
Upvote 0
Everyone has own imagination which can be different from person to person. If you provide sample data, you'd probably get quicker response. ;)
Example data as below, actual data contains multiple thousand names including duplicates but if in one list will always be in the same format in that list.

Ideally from the list below only Jones, James would be returned as unique to either list

Range 1
Thompson, John Frederick George
Datta, Lynn Ms
Lewis, Victoria Mrs
Al Gazi, Anwar Mr

Range 2
Lewis, Victoria J.
Thompson, John Mr
Datta, Lynn
Al-Gazi, Anwar Mr
Jones, James
 
Upvote 0
Example data as below, actual data contains multiple thousand names including duplicates but if in one list will always be in the same format in that list.

Ideally from the list below only Jones, James would be returned as unique to either list

Range 1
Thompson, John Frederick George
Datta, Lynn Ms
Lewis, Victoria Mrs
Al Gazi, Anwar Mr

Range 2
Lewis, Victoria J.
Thompson, John Mr
Datta, Lynn
Al-Gazi, Anwar Mr
Jones, James
It is very rare for a large list of names to be unique.
 
Upvote 0
Hello, as there might be many possibilities of how the data is structured, it will probably be hard to solve everything via one formula, i.e. there will be need for some iterations with different approaches. As a first step you could e.g. use the following:

Excel Formula:
=IFERROR(LEFT(TRIM(A1),SEARCH("#",SUBSTITUTE(TRIM(A1)," ","#",2))-1),A1)

Excel Formula:
=IFERROR(LEFT(TRIM(B1),SEARCH("#",SUBSTITUTE(TRIM(B1)," ","#",2))-1),A1)

i.e. use this formula on both ranges and then use e.g. COUNTIFS to identify names that are on both lists (i.e. those where the count will be > 0; there still might be neccessary to check those results). Where the result of COUNTIFS will be 0, further investigation will be necessary (e.g. Al Gazi, Anwar Mr and Al-Gazi, Anwar Mr) where the most important thing is to identify patterns.
 
Upvote 0
Example data as below, actual data contains multiple thousand names including duplicates but if in one list will always be in the same format in that list.

Ideally from the list below only Jones, James would be returned as unique to either list

Range 1
Thompson, John Frederick George
Datta, Lynn Ms
Lewis, Victoria Mrs
Al Gazi, Anwar Mr

Range 2
Lewis, Victoria J.
Thompson, John Mr
Datta, Lynn
Al-Gazi, Anwar Mr
Jones, James
Still need clarification for one to avoid possible wrong result, like:
Thompson, John Frederick George = Thompson, John Mr

Is there is possibility that in Range 1 there are
Thompson, John Steward
Thompson, John Frederick

and in Range 2 only
Thompson, John Mr
 
Upvote 0

Forum statistics

Threads
1,224,815
Messages
6,181,136
Members
453,021
Latest member
Justyna P

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