Match and insert

BingoGeorge

New Member
Joined
Feb 21, 2017
Messages
10
Hi there,

I have to sheets on excel

SHEET 1

nameIDEmployee
JOHN5456456456
FRED141541546
JANE13131531

<tbody>
</tbody>


Sheet 2
IDEmployee
5456456456B123123
141541546B565413
13131531B54546

<tbody>
</tbody>


What I need is a formula to have the Employee number added to Sheet 1 by matching the ID# from sheet 2.

Thank you!
****** id="cke_pastebin" style="position: absolute; top: 314px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
13131531

<tbody>
</tbody>
</body>
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
This should work for you.

Code:
=VLOOKUP(B2,'SHEET 2'!$A$2:$B$4,1,0)

Put that in B2 and copy down as necessary. If your data range on Sheet 2 is larger update the $A$2:$B$4 to reflect the larger data group.
 
Upvote 0
This should work for you.

Code:
=VLOOKUP(B2,'SHEET 2'!$A$2:$B$4,1,0)

Put that in B2 and copy down as necessary. If your data range on Sheet 2 is larger update the $A$2:$B$4 to reflect the larger data group.


when I do this it says "TRUE".
 
Upvote 0
I went based on what you typed in terms of sheet names, if you don't have a space between the word 'sheet' and the '2' then remove that space. Just update "SHEET 2" to be whatever your actual sheet name is, I think that is the issue.

If that already matches can you copy and paste in the full formula as you put it on your sheet.
 
Last edited:
Upvote 0
A
B
C
D
1
nameIDEmployeesheet1
2
JOHN
5456456456​
B123123
3
FRED
141541546​
B565413
4
JANE
13131531​
B54546

<tbody>
</tbody>


A
B
C
1
IDEmployeesheet2
2
5456456456​
B123123
3
141541546​
B565413
4
13131531​
B54546

<tbody>
</tbody>

sheet1

c2=INDEX(Sheet2!$B$2:$B$4,MATCH(Sheet1!$B2,Sheet2!$A$2:$A$4,0)) copy down
 
Upvote 0

Forum statistics

Threads
1,216,216
Messages
6,129,566
Members
449,517
Latest member
Lsmich

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