Comparing two sets of columns

karkas

Board Regular
Joined
Oct 17, 2007
Messages
170
Office Version
  1. 2013
Platform
  1. Windows
I am trying to cross reference 4 columns of names.
Data arrangement:
In row C I have last name which usually (not always) ends in a comma or period (~2300 rows).
In row D I have the first name of the person from row C (same # of rows).

In row L I have a master list of last names (~13,000 rows)
In row M I have the first name of the person from row L (same # of rows).


What I am looking for:
I need to see if the people listed in rows C & D match the master list of people in rows L & M.

I want to Check the names in Column C against the mast list in column L, but there are two problems.
1) The names in column C usually end in a comma or period that I need to ignore.
2) Once it matches the name in C to L, it needs to check to see if the first name in column D matches the first name in M. (It needs to match on BOTH first and last name).

Not sure if that is confusing and/or vague. Please let me know if I need to clarify further.

Thanks in advance!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi,

You didn't specify what you want if C & D is a match in L & M, so assuming you just want it Flagged Yes or No:


Book1
CDEFLM
1LastFirstMatch?LastFirst
2Doe.JohnYesDoeMay
3Doe,JackYesDoeJane
4DoeJillNoDoeJan
5DoeJaneYesDoeJohn
6DoeJack
Sheet535
Cell Formulas
RangeFormula
E2=IF(ISNUMBER(LOOKUP(2,1/SEARCH(SUBSTITUTE(SUBSTITUTE(C2,".",""),",","")&"|"&D2,L$2:L$6&"|"&M$2:M$6))),"Yes","No")


Formula copied down.
 
Upvote 0
Wow, that is amazing! It seems to work! I'll look more closely and let you know if anything seems off!

Thanks again! HUGE help!
 
Upvote 0
You're welcome, thanks for the feedback.
 
Upvote 0
I lost my script because of a crash and can no longer read this. It just looks like code now. Is there a way to reveal the info that jtakw posted?

Thanks for anyone that can help.
 
Upvote 0
From what I can make out it was
=IF(ISNUMBER(LOOKUP(2,1/SEARCH(SUBSTITUTE(SUBSTITUTE(C2,".",""),",","")&"|"&D2,L$2:L$6&"|"&M$2:M$6))),"Yes","No")
 
Upvote 0

Forum statistics

Threads
1,214,560
Messages
6,120,222
Members
448,951
Latest member
jennlynn

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