Matching names to ID numbers

dgavin

Active Member
Joined
Feb 16, 2005
Messages
302
I have two worksheets. Worksheet 1 and Worksheet 2.

Worksheet 1 lists first names in column A , last names in column B and ID numbers in column C.

Worksheet 1 in now out of date

Worksheet 2 contains an up to date list of first and last names but NO I numbers.

What formula can i use to enable Worksheet 2 find and match the same name as Worksheet 1 and copy the ID number into column C.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Assuming that your data starts in cell A1, one of the fastest way would be to add one more column in Sheet1 in say column D with the formula like:

=A1&" "&B1.

Copy column D and paste special values and finally do an INDEX(MATCH()) on column D to bring values in column C onto Worksheet 2.

Like this:

Worksheet1:
Book6
ABCD
1NameName2NumberConcatenateA&B
2RamGam222RamGam
3SamJam333SamJam
4PamTam444PamTam
5
Sheet1


Worksheet2:
Book6
ABCD
1NameNumber
2SamJam333
3
Sheet2
 
Last edited:
Upvote 0
In cell A2 of sheet2:

Code:
=SUMPRODUCT(--(Sheet1!$A$2:$A$1000=Sheet2!A2),--(Sheet1!$B$2:$B$1000=Sheet2!B2),Sheet1!$C$2:$C$1000)

Copy and paste down.
 
Upvote 0
In cell A2 of sheet2:

Code:
=SUMPRODUCT(--(Sheet1!$A$2:$A$1000=Sheet2!A2),--(Sheet1!$B$2:$B$1000=Sheet2!B2),Sheet1!$C$2:$C$1000)

Copy and paste down.

Whoa :eek:

Am I missing something here ? It can be that I did not understand the question:

Is Worksheet2 having first and last names in a single column (col A) or are the first and last names divided into 2 columns ( col A & col B ) respectively ?

This is the main reason I would like to probe the OPs before answering them...and I guess I need to be careful now :eek:
 
Upvote 0
I have two worksheets. Worksheet 1 and Worksheet 2.

Worksheet 1 lists first names in column A , last names in column B and ID numbers in column C.

Worksheet 1 in now out of date

Worksheet 2 contains an up to date list of first and last names but NO I numbers.

What formula can i use to enable Worksheet 2 find and match the same name as Worksheet 1 and copy the ID number into column C.

Sheet2...

C2:

Control+shift+enter, not just enter...

=INDEX(Sheet1!$C$2:$C$300,MATCH(1,IF(Sheet1!$A$2:$A$300=A2,IF(Sheet1!$B$2:$B$300=B2,1)),0))

and copy down.
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

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