Lookup Multiple Results for Multiple Criteria

Posted by Matt on Super User See other posts from Super User or by Matt
Published on 2012-04-05T16:47:56Z Indexed on 2012/04/05 17:35 UTC
Read the original article Hit count: 254

I've got a list of parent SKUs for items I need to create in my inventory system. This list has been finely paired down to the 165 products we would like to carry. However, each one of these 165 SKUs has between 2 and 8 child SKUs of different colors, sizes, etc. Those are stored on a different worksheet, mixed into around 2500 items. Those are the SKUs I need to input into my inventory system.

Here is what it looks like.

Sheet 1 is just SKUs:

A
1
2
3
4

Sheet 2 is comprised of all the child SKUs, with parent SKUs in column B. Not all parents have the same number of children:

  A        B
1BLKM      1
1BLKL      1
1BLUM      1
2BLKM      2
2BLKL      2
2BLUM      2
2ORAM      2
3BLKM      3
3BLUM      3

I want to look up all of the child SKUs for the Parent SKU list that has been fine tuned. Parent SKU is included as a column on the child SKU worksheet. I need to lookup all matches of the Parent SKU, then continue to move down the parent SKU list until all matches for all 165 parent items have been found.

It seems like every function I try can't use an Array for input. Is there a way to do this with Lookup or some combination of index, match, row, etc? Any way at all to do it without VBA? Or maybe even a VBA solution with code that I can understand, as someone who hasn't used VBA before.

© Super User or respective owner

Related posts about microsoft-excel

Related posts about excel-2007