Vlookup / index match

Planogrammer

New Member
Joined
Feb 25, 2016
Messages
5
Hey All,
So what I'm trying to do is pull data from 1 table or sheet into another. I have tried VLOOKUP & INDEX MATCH, on both separate sheets & also with both tables on the same sheet. I am trying to get Height Width & Depth fields to pull from one table to the other, by matching the UPC. So that only matches will populate, as there are different amounts of data in each table. The data would not line up by just dropping it in manually.

This is the table I would like to pull data from -

UPC
Long Description

<tbody>
</tbody>
Size

<tbody>
</tbody>
UOMCase PackHeightWidthDepth
1480000034

<tbody>
</tbody>
MOTTS REG APPLE JUICE

<tbody>
</tbody>
64

<tbody>
</tbody>
FL

<tbody>
</tbody>
89.654.654.6
1480000039
MOTTS APPLE JUICE

<tbody>
</tbody>
128FL411.765.555.55
1480000131
MOTT'S MEDLEY APPLE 100%

<tbody>
</tbody>
64FL89.654.654.6

<tbody>
</tbody>

& I would like to pull the Height Width & Depth fields into this table -

UPCITEMLONG DESCRIPTIONSIZEUOMCASEPACKBRANDCATEGORYSUBTYPEPACKAGE TYPEELIGIBLESTATUSHEIGHTWIDTHDEPTH
1153502556

<tbody>
</tbody>
162019
WLD HRVST Orgnc Jce Apple

<tbody>
</tbody>
64oz8Wild HarvestSS BottledAppleBottleYesUA
1153550042

<tbody>
</tbody>
16200
WLD HRVST Orgnc Jce Lmnade

<tbody>
</tbody>
64oz8Wild HarvestSS BottledLemonadeBottleYesUA
1480000032

<tbody>
</tbody>
161098
MOTT Apple Juice Clear

<tbody>
</tbody>
32oz12MOTTSSS BottledAppleBottleYesA

<tbody>
</tbody>

These are the top 4 lines(including headers) from both tables, so as you can see, the UPCs do not line up when sorted, due to variety in the tables. The 5th line in the second table matches the 1st line in the 1st table, just as an example. But they still do not line up after that.

So where i'm getting stuck is figuring out the proper formula to match the Height Width & Depth in a row by matching the UPC between the tables. I've tried VLOOKUP & INDEX MATCH without success so far. Any help would be much appreciated.

Thanks
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
See if this works.
Formula can just be copied down and across as needed.

Excel Workbook
ABCDEFLMNO
1UPCITEMLONG DESCRIPTIONSIZEUOMCASEPACKSTATUSHEIGHTWIDTHDEPTH
21153502556162019WLD HRVST Orgnc Jce Apple64oz8UA1.12.13.1
3115355004216200WLD HRVST Orgnc Jce Lmnade64oz8UA4.15.16
41480000032161098MOTT Apple Juice Clear32oz12A7.28.29.2
Sheet2



Excel Workbook
ABCDEFGH
1UPCLong DescriptionSizeUOMCase PackHeightWidthDepth
21480000034MOTTS REG APPLE JUICE64FL89.654.654.6
31480000039MOTTS APPLE JUICE128FL411.765.555.55
41480000131MOTT'S MEDLEY APPLE 100%64FL89.654.654.6
51153502556WLD HRVST Orgnc Jce Apple64oz81.12.13.1
61153550042WLD HRVST Orgnc Jce Lmnade64oz84.15.16
71480000032MOTT Apple Juice Clear32oz127.28.29.2
Sheet1
 
Upvote 0
Thanks for the reply. I still get N/A with that formula unfortunately.
I tried working with both tables in the same sheet also, to see if that would be easier, but that's not working either. With both tables in the same sheet, my values for table 1 are UPC in Column A, Height Width & Depth in M N O. & for Table 2, UPC is in Column R, & Height Width Depth in W X Y.
When they are in separate sheets, the columns are as you have them above.
 
Upvote 0
I figured out the issue. My Formula of " =INDEX(W2:W375,MATCH(A2,R2:R375, 0) ) " was right....however, when I copy down the line, it was changing the the INDEX return value. So instead of staying at W2:W375, it was changing to W3:W376 & so on.
 
Upvote 0
The NA means it does not find a match.
Could it be that the UPC code in one table is text and it's a number in the other table. Also, check to make sure there are no extra spaces in one of the tables.
 
Upvote 0
my only issue now is, when i copy the formula, i need the A cell in the MATCH string to change, but I need the INDEX for W2:W375 & the MATCH R2:R375 to stay the same. I'm not sure how to let A change while keeping the other values the same.
 
Upvote 0
I haven't tested your formula, but you would need to lock the cells. Try:

Code:
=INDEX($W$2:$W$375,MATCH(A2,$R$2:$R$375, 0) )
 
Upvote 0

Forum statistics

Threads
1,216,381
Messages
6,130,294
Members
449,570
Latest member
TomMacca52

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