VLOOKUP Issues

MWilliams

Board Regular
Joined
Jan 29, 2010
Messages
99
Hello everyone,
I am sure that I would find the answer if I keep trying but I'm running out of time here.

I have two files and need to combine them.
One file contains a reference (Item-ID) to records (Item-ID, Item Name and Category) found in the other file.

There could be multiple references to the same record. I want to copy the records over. I hope the screenshot of this scenario will help.

(I can also copy the data from File B to another sheet in File A...

Thank you in advance for your suggestions.
 

Attachments

  • vlookup.jpg
    vlookup.jpg
    81 KB · Views: 14

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
There will be different ways to do this.

To do it quickly, I'd
- put A and B in the same workbook
- insert two columns in A
- use a VLOOKUP formula (or XLOOKUP both columns in one go, if you have the XLOOKUP function)
- copy the two columns of formula cells and paste as values
- delete B

ABCDEFGHIJK
1ItemData-2Data-3Data-4Source B
217ApplesFruitBlahBlahBlah17ApplesFruit
318PearsFruitBlahBlahBlah18PearsFruit
418PearsFruitBlahBlahBlah19GrapesFruit
519GrapesFruitBlahBlahBlah20BananasFruit
620BananasFruitBlahBlahBlah21WatermelonFruit
720BananasFruitBlahBlahBlah
Sheet1
Cell Formulas
RangeFormula
B2:B7B2=VLOOKUP($A2,$I$2:$K$6,2,)
C2:C7C2=VLOOKUP($A2,$I$2:$K$6,3,)
 
Upvote 0
Thank you very much!
I eventually figured out that the data in one of my ID columns was "a number stored as text" and as soon as I converted it to a number, the formula worked properly!
Thanks for your help. Greatly appreciated.
 
Upvote 0

Forum statistics

Threads
1,225,741
Messages
6,186,761
Members
453,370
Latest member
juliewar

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