Look up value which appears in column multiple times & display the values of cells on each row

cfcMalky

Board Regular
Joined
Nov 5, 2013
Messages
52
Hi folks

Got a wee lookup problem here, I want to search a column for a certain value which is displayed in a cell away from the table, the column will have more than 1 of this value, with different values in other cells on their rows, I want to display values from each row which contains my search value, This sounds double dutch I know lol, hopefully I can give a half decent example of what I'm gibbering about, Here goes nothing!:
Table 1 (Orders): (Underlined values are headers, the column has these names)
ab
1
OrderSKU
211
312
413

<tbody>
</tbody>

Table 1 basically tells you that 1 order has been placed, for 3 different items



Table 2 (Invoice): I would like to select order 1 in a cell away from this table (cell Z1 for example), and have this table display the 3 items from that order, in the rows in the SKU column, obviously i can't use vlookup because that would return N/A after finding the order number 3 times, with 3 different values over the search array.
a
1SKU
2
3
4

<tbody>
</tbody>


Thanks for your time guys:biggrin:
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
2010 version:
In Cell AA1 use =COUNTIF(Table1,Z1), this will give you a count of of items in the order.

In Table 2 A2 use =IF(ROWS($AB$1:AB1)>AA1,"",INDEX(Table1!B:B,AGGREGATE(15,6,ROW(Table2!B:B)-ROW(Table2!$B$1)+1/(Table1A:A=Z1),ROWS($AB$1:AB1))) Then copy Down
 
Upvote 0
I've got my nut in a twist here lol, because the table/cell numbers I used in the example are totally different from the ones on my workbook, when i try to edit my workbook
it all goes wrong, could i send you a workbook and you could edit it?
 
Upvote 0
A pivot table would do the job for you efficiently.


Hi folks

Got a wee lookup problem here, I want to search a column for a certain value which is displayed in a cell away from the table, the column will have more than 1 of this value, with different values in other cells on their rows, I want to display values from each row which contains my search value, This sounds double dutch I know lol, hopefully I can give a half decent example of what I'm gibbering about, Here goes nothing!:
Table 1 (Orders): (Underlined values are headers, the column has these names)
ab
1OrderSKU
211
312
413

<tbody>
</tbody>

Table 1 basically tells you that 1 order has been placed, for 3 different items



Table 2 (Invoice): I would like to select order 1 in a cell away from this table (cell Z1 for example), and have this table display the 3 items from that order, in the rows in the SKU column, obviously i can't use vlookup because that would return N/A after finding the order number 3 times, with 3 different values over the search array.
a
1SKU
2
3
4

<tbody>
</tbody>


Thanks for your time guys:biggrin:
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,975
Members
449,200
Latest member
Jamil ahmed

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