Vlookup between 2 excel files

manoj18071965

Board Regular
Joined
Sep 16, 2011
Messages
65
I have two excel sheets having first column same value i.e. ECode

Ecode1.xls

ECode CL SL PL LWP Sick
20396 5 9 8 3 4
60015 1 2 6 3 4
25654 1 2 3 4 6
78798 9 8 7 6 5
45665 4 5 6 1 2
56531 3 2 5 6 9

Ecode2.xls

Code CL SL PL LWP Sick
20396
25654
45665

I want Ecode1.xls results in Ecode2.xls.

Pls help!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Put in de cel B2 in Ecode2.xls the following:

=Vlookup(A2;[Mapname]Range;2;0)

where Mapname = Ecode1.xls
Range = searchrange (the values to lookup including de searchvalues (20396) exclude the headings)

Jos
 
Upvote 0
Put in de cel B2 in Ecode2.xls the following:

=Vlookup(A2;[Mapname]Range;2;0)

where Mapname = Ecode1.xls
Range = searchrange (the values to lookup including de searchvalues (20396) exclude the headings)

Jos

Thanks Jos but by applying above I am only able to get value for CL. If I copy same formula for SL, PL, LWP, Sick I get #N/A. (Please see below)

Code CL SL PL LWP Sick
20396 5 #N/A #N/A #N/A #N/A
25654 1 #N/A #N/A #N/A #N/A
45665 4 #N/A #N/A #N/A #N/A

My question is do I need to edit formula for each case i.e.

To get value for SL

Formula copied value:
=VLOOKUP(B2,[Ecode1.xlsx]Sheet1!$A$2:$F$7,2,0)

Formula edited:
=VLOOKUP(A2,[Ecode1.xlsx]Sheet1!$A$2:$F$7,3,0)


And so on for PL, LWP & Sick...
 
Upvote 0
Hi,

You can use this formula :
=VLOOKUP($A2,[Ecode1.xlsx]Sheet1!$A$2:$F$7,Column(),0) then drag to right and after down.
 
Upvote 0
Yes I forgot to say that,

You need to adjust the formula or use the formula from Ingolf

Jos
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,280
Members
452,902
Latest member
Knuddeluff

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