Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default return multiple values in a list?

I have a list that has two columns.. In column A is a list of containers. in
column B is a list of components.

The containers in A can have multiple components in them i.e.

Cont Comp

1 xyz
1 ABC
1 DEF
2 aaa
3 bbb
3 baa


how can I get a list of every component that appears in a given container?
Vlookup returns a component in a given box, but not EVERY component?


ideas anyone?




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default return multiple values in a list?

AutoFilter is a easy solution

"jiwolf" wrote:

I have a list that has two columns.. In column A is a list of containers. in
column B is a list of components.

The containers in A can have multiple components in them i.e.

Cont Comp

1 xyz
1 ABC
1 DEF
2 aaa
3 bbb
3 baa


how can I get a list of every component that appears in a given container?
Vlookup returns a component in a given box, but not EVERY component?


ideas anyone?





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default return multiple values in a list?

autofilter will work, but i need it as a function. i need to return the
values to a sencond worksheet


"Teethless mama" wrote in message
...
AutoFilter is a easy solution

"jiwolf" wrote:

I have a list that has two columns.. In column A is a list of containers.
in
column B is a list of components.

The containers in A can have multiple components in them i.e.

Cont Comp

1 xyz
1 ABC
1 DEF
2 aaa
3 bbb
3 baa


how can I get a list of every component that appears in a given
container?
Vlookup returns a component in a given box, but not EVERY component?


ideas anyone?







  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default return multiple values in a list?

Why not just use a pivot table? It can give you an answer like this (you
would probably disable subtotals):
1
xyz
ABC
DEF
2
aaa

Or, if you need the results to fit into a template you've made, then you
could just put the components as headers across the pivot table and the data
will be a count of how many times a component shows up in each container
(again, disable subtotals). Off to the right of the pivot table, make a
string of all the headers that have a 1 for that row. Then you can use
vlookup and get the data you need from that string you formed.

Sorry, I don't know how to write functions very well, but I'm comfortable
with formulas and this would be a cinch to accomplish.

"jiwolf" wrote in message
...
autofilter will work, but i need it as a function. i need to return the
values to a sencond worksheet


"Teethless mama" wrote in
message ...
AutoFilter is a easy solution

"jiwolf" wrote:

I have a list that has two columns.. In column A is a list of
containers. in
column B is a list of components.

The containers in A can have multiple components in them i.e.

Cont Comp

1 xyz
1 ABC
1 DEF
2 aaa
3 bbb
3 baa


how can I get a list of every component that appears in a given
container?
Vlookup returns a component in a given box, but not EVERY component?


ideas anyone?









  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default return multiple values in a list?

Hi:
Assuming data are in A2:B8. Assuming lookup value in C2, your list
starts at D2. In D2:

=IF(ROW()-ROW($D$2)+1<=COUNTIF($A$2:$A$8,$C$2),INDEX($B$2:$B $8,SMALL(IF($A$2:$A$8=$C$2,ROW($B$2:$B$8)-ROW($B$2)+1),ROW()-ROW($D$2)+1)),"")

This is an array formula, thus you have to commit with Ctrl+Shift+Enter

HTH
Kostis Vezerides

KC Rippstein wrote:
Why not just use a pivot table? It can give you an answer like this (you
would probably disable subtotals):
1
xyz
ABC
DEF
2
aaa

Or, if you need the results to fit into a template you've made, then you
could just put the components as headers across the pivot table and the data
will be a count of how many times a component shows up in each container
(again, disable subtotals). Off to the right of the pivot table, make a
string of all the headers that have a 1 for that row. Then you can use
vlookup and get the data you need from that string you formed.

Sorry, I don't know how to write functions very well, but I'm comfortable
with formulas and this would be a cinch to accomplish.

"jiwolf" wrote in message
...
autofilter will work, but i need it as a function. i need to return the
values to a sencond worksheet


"Teethless mama" wrote in
message ...
AutoFilter is a easy solution

"jiwolf" wrote:

I have a list that has two columns.. In column A is a list of
containers. in
column B is a list of components.

The containers in A can have multiple components in them i.e.

Cont Comp

1 xyz
1 ABC
1 DEF
2 aaa
3 bbb
3 baa


how can I get a list of every component that appears in a given
container?
Vlookup returns a component in a given box, but not EVERY component?


ideas anyone?








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
if multiple values same/others different, return true Jshendel Excel Discussion (Misc queries) 7 August 21st 06 06:14 PM
Help needed replacing multiple cells from a list of values. Emoshag Excel Discussion (Misc queries) 6 July 6th 06 09:15 PM
Lookup in Multiple Columns, Return Multiple Values andy62 Excel Worksheet Functions 3 July 6th 06 02:36 AM
How to look up a value in a list and return multiple corresponding Utsav Excel Discussion (Misc queries) 1 June 7th 06 05:11 AM
Adding multiple cells, return specific values Jim Excel Worksheet Functions 4 December 8th 04 07:26 AM


All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"