vlookup

Curious

Board Regular
Joined
Aug 22, 2003
Messages
77
Hi Folks;
I have a sheet "A" that has a column called premium code, and then I have another sheet "B" that has the premium code column as well as 3 other columns. I would like to do a vlookup and when ever the premium code from the sheet "A" matches the premium code on sheet "B" to copy the other 3 columns from sheet "B" to sheet "A".

Thanks
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
In the first row on Sheet A next to the Code, enter these

To return the first column,
=Vlookup($A1,SheetB!A:D,2,0)

For the second column,
=Vlookup($A1,SheetB!A:D,3,0)

For the third column
=Vlookup($A1,SheetB!A:D,4,0)

Copy these down as far as needed.
 

Curious

Board Regular
Joined
Aug 22, 2003
Messages
77
Thanks I think that is exactly what I am looking for.

:pray: :pray: :pray:
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
Curious said:
Hi Folks;
I have a sheet "A" that has a column called premium code, and then I have another sheet "B" that has the premium code column as well as 3 other columns. I would like to do a vlookup and when ever the premium code from the sheet "A" matches the premium code on sheet "B" to copy the other 3 columns from sheet "B" to sheet "A".

Thanks

In B2 on sheetA enter & copy down:

=MATCH(A2,sheetB!A:A,0)

where A2 houses a premium code to match.

In C2 enter and copy across to E2 then down:

=IF(ISNUMBER($B2),INDEX(sheetB!B:B,$B2),"")
 

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
I don't see how 2 formulas (one having 2 functions) is better than having the Vlookup formulas, which need only change the column number to reference.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,852
Messages
5,833,982
Members
430,249
Latest member
Muka

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
Top