Please help! Huge project for work: VLOOKUP Across Multiple Rows and Columns

acholt17

New Member
Joined
Dec 1, 2016
Messages
12
I am working on a project for work that involves over a thousand part numbers. Please refer to the tables below as examples:
Table 1: Main
Part #Part Descrp.plasticpaperstickerclothstring
123balloon
124brush
125CD
126Pillow

<tbody>
</tbody>

Table 2: Materials
Part #Part Descrp.Pkg Items
123balloonplastic
123balloonstring
124brushplastic
124brushpaper
125CDplastic
125CDsticker
125CDpaper
126Pillowcloth
126Pillowsticker

<tbody>
</tbody>

I need to take Table 1:Main and place an X every time a part number is used in Table 2: Materials. I need it to look like this:
Part #Part Descrp.plasticpaperstickerclothstring
123balloonX
X
124brushX
X
125CDX
X
X
126PillowX
X

<tbody>
</tbody>

Both Table 1: Main and Table 2: Materials are in different sheets because Table 1: Main has 466 rows while Table 2: Materials has 1212 rows. I have tried if statements, nested if statements within a vlookup, vlookup with match, etc. I tried =IF(AND($C4='Packaging Material'!$B$2:$B$1212, N$3='Packaging Material'!$F$2:$F$1212),"X", "") and it will only show a X on some of the packaging items (i.e. plastic, paper, sticker, cloth, string) but not on all of them.

Will someone please help me? I really do not want to manually put in the X's for that many rows of data.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
maybe something like...

Excel 2013
ABCDEFG
1Part #Part Descrp.plasticpaperstickerclothstring
2123balloonXX
3124brushXX
4125CDXXX
5126PillowXX
6
7Table 2: Materials
8Part #Part Descrp.Pkg Items
9123balloonplastic
10123balloonstring
11124brushplastic
12124brushpaper
13125CDplastic
14125CDsticker
15125CDpaper
16126Pillowcloth
17126Pillowsticker

<tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
C2=IF(SUMPRODUCT(($A$9:$A$17=$A2)*($B$9:$B$17=$B2)*($C$9:$C$17=C$1))>0,"X","")

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
I was just informed that I need to put quantities in instead of X's. For example, in the worksheet above, I would have a packaging qty list starting row D8. If D9 were to equal 5 then C2 would equal 5 as well instead of an X. I am unsure how to rewrite the true part of the conditional for the program to pull the correct qty. Do you mind helping me once more?
 
Upvote 0
Hi,

quantities in d9:d17

=SUMPRODUCT(($A$9:$A$17=$A2)*($B$9:$B$17=$B2)*($C$9:$C$17=C$1)*$D$9:$D$17)


If do not need to see zeros

=IF(SUMPRODUCT(($A$9:$A$17=$A2)*($B$9:$B$17=$B2)*($C$9:$C$17=C$1)*$D$9:$D$17),SUMPRODUCT(($A$9:$A$17=$A2)*($B$9:$B$17=$B2)*($C$9:$C$17=C$1)*$D$9:$D$17),"")

or using first formula, format cells as

#.##0,-#.##0,


Hope it helps
 
Last edited:
Upvote 0
possibly something like...

Excel 2010
ABCDEFG
1Part #Part Descrp.plasticpaperstickerclothstring
2123balloon50002
3124brush34000
4125CD57600
5126Pillow00980
6
7Table 2: Materials
8Part #Part Descrp.Pkg ItemsQty.
9123balloonplastic5
10123balloonstring2
11124brushplastic3
12124brushpaper4
13125CDplastic5
14125CDsticker6
15125CDpaper7
16126Pillowcloth8
17126Pillowsticker9

<tbody>
</tbody>
Sheet3

Worksheet Formulas
CellFormula
C2=SUMPRODUCT(($A$9:$A$17=$A2)*($B$9:$B$17=$B2)*($C$9:$C$17=C$1)*($D$9:$D$17))

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
How do I keep the cells that do not have any material from saying zero and just staying blank? Like if balloon only have 5 pieces of plastic, I want D2 through G2 to remain blank and not have a zero.


Thanks for responding so fast!
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,688
Members
448,978
Latest member
rrauni

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