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
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

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,201
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,255
Messages
5,595,106
Members
413,970
Latest member
Hodg100

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