Compare Excel Spreadsheet.

Dear Excel pros, I need some help please!

I have two Excel Spreadsheets.

Spreadsheet 1 contains list of username like the following in one column:
Employee Names
Burris, Jack
Cortez, Eric
Smith, Mary
Brand, John
Boamah, Nana Yaa

Spreadsheet 2 contains list of First Names and Last Names in separate columns:
First Name      Last Name
Jack                      Burris
John              Wang
Ed                      Cool
Mary              Smith
Jack                      Casey
Boamah              Nana Yaa

I want to have spreadsheet 2 to look up spreadsheet 1 and put "Match" in 3rd column next to the names that matched (Both Firstname and Lastname appear in sheet 1).  For example:
First Name      Last Name
Jack                      Burris                 Match
John              Wang
Ed                      Cool
Mary              Smith                 Match
Jack                      Casey
Boamah              Nana Yaa          Match

Please advise.  Thanks.
nav2567Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
in Spreadsheet 2, cell c2, try use formula:

=IF(ISERROR( MATCH(B2 & ", " &A2,Sheet1!A:A,0) ), "", "Match")

Open in new window


apply this by drop it down to following rows.

pls note for last entry:

Boamah      Nana Yaa      

will not be matched as the Last Name and FirstName is in reverse order.
0
nav2567Author Commented:
Thanks.  I will test. In sheet 2, the user name is Nana Yaa Boamah.  It should show a match, right?

Also, if I have the following in sheet 1 (no comma), will your formula work?

Burris Jack
Cortez Eric
Smith Mary
Brand John
Boamah Nana Yaa
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You may try something like this.
The following formula will also work if on the first sheet, names are not separated by a comma.
=IF(ISNUMBER(MATCH(B2&" "&A2,INDEX(SUBSTITUTE(Sheet1!$A$2:$A$1000,",","")&SUBSTITUTE(Sheet1!$B$2:$B$1000,",",""),),0)),"Match",IF(ISNUMBER(MATCH(A2&" "&B2,INDEX(SUBSTITUTE(Sheet1!$A$2:$A$1000,",","")&SUBSTITUTE(Sheet1!$B$2:$B$1000,",",""),),0)),"Match",""))

Open in new window

Adjust the ranges as required.
0
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
In sheet 2, the user name is Nana Yaa Boamah.  It should show a match, right?

Open in new window

yes, then it will match. accordance to match with "Last Name" + " " (space) + "First Name" format.

SnapShot.png
Also, if I have the following in sheet 1 (no comma), will your formula work?
so you need to remove the comma from formula:
=IF(ISERROR( MATCH(B2 & ", " &A2,Sheet1!A:A,0) ), "", "Match")

Open in new window


to become:

=IF(ISERROR( MATCH(B2 & " " &A2,Sheet1!A:A,0) ), "", "Match")

Open in new window

29013740.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.