Returning multiple values from a lookup list

asawhill

New Member
Joined
Jul 26, 2004
Messages
8
I'm trying to lookup and return mulitple values from a list based one a single criteria. I know that this can easily be done in Access or in Excel via VBA programming or autofilters. Is there a way to do this using a function or combination of functions?

For example, in my data table, I have two columns: one for product category, and one for stock number. I would like to return all the stock numbers for a particular product category based on an input in a separate cell.

Any suggestions? Thanks.
 
asawhill said:
I need to use a formula. Thanks.


Creating a distinct or unique list of items using a formula system...
Book4
ABCD
14
2StockNumber0Distinct StockNumber
3310313103
43103 3546
5354624587
6458736257
74587  
84587  
962574 
10
Sheet1


Formulas...

B2 must house a 0.

B3, copied down:

=IF((A3<>"")*ISNA(MATCH(A3,$A$2:A2,0)),LOOKUP(9.99999999999999E+307,$B$2:B2)+1,"")

D1:

=LOOKUP(9.99999999999999E+307,B:B)

D3, copied down:

=IF(ROW()-ROW(D$3)+1<=$D$1,INDEX(A:A,MATCH(ROW()-ROW(D$3)+1,B:B)),"")
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,216,514
Messages
6,131,105
Members
449,618
Latest member
lewismillar

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