How to merge to coloums

K

khers

Hei
I have one spreadsheet with folowing coloums:
Name1 - Surname1 - Cardnumber1
Name2 - Surname2 - Cardnumber2
Name3 - Surname3 - Cardnumber3
Name4 - Surname4 - Cardnumber4

and another spreasheet with following coloums:
Name1 - Surname1 - Username1
Name2 - Surname2 - Username2
Name3 - Surname3 - Username3
Name4 - Surname4 - Username4
Name5 - Surname5 - Username5
Name6 - Surname6 - Username6

What I need is to look for Name and Surname in my second sheet and
extract the user name so I end up with these coloums in a new
spreadsheet
Name1- Surname1 - Username1 - Cardnumber1
Name2- Surname2 - Username2 - Cardnumber2
Name3- Surname3 - Username3 - Cardnumber3
Name4- Surname4 - Username4 - Cardnumber4

Does anyone know how to do this?
Thnaks in advans
khers
 
D

Dave Peterson

I would add a new column A to Sheet2.

Then I'd fill that column with a formula like:
=b1&"|"&c1
and drag down.

Then I would insert a new column C in Sheet1 (shifting the card number to column D.

In C1, I'd use a formula like this to retrieve the Username.

=vlookup(a1&"|"&b1,sheet2!a:d,4,false)
and drag down.

If the formula returns the N/A error, that means there is no match for that
name/surname.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top