Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Lookup multiple lines

Hi,

Not sure if this is possible using functions or if it requires a macro.
I have two lists, one containing all possible variations of items and one
containing a list of items. What I need to do is combine these lists to
produce a third list that contains every version of the items in the second
list.

Example:

List 1
Column A Column B
Widget Red
Widget Green
Widget Blue
Gadget Red
Gadget Yellow
Thingy Purple
Thingy Pink
DooDah Orange
Doodah Green
Doodah Turquoise

List 2
Column A
Gadget
Doodah

List 3 - Desired Output
Gadget Red
Gadget Yellow
DooDah Orange
Doodah Green
Doodah Turquoise

Any ideas? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 150
Default Lookup multiple lines

Assumptions:

A2:B11 contains List 1

D2:D3 contains List 2

Formulas:

F2:

=SUMPRODUCT(COUNTIF(A2:A11,D2:D3))

G2, copied down and across:

=IF(ROWS(G$2:G2)<=$F$2,INDEX(A$2:A$11,SMALL(IF(ISN UMBER(MATCH($A$2:$A$11,
$D$2:$D$3,0)),ROW($A$2:$A$11)-ROW($A$2)+1),ROWS(G$2:G2))),"")

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
Freeflyer wrote:

Hi,

Not sure if this is possible using functions or if it requires a macro.
I have two lists, one containing all possible variations of items and one
containing a list of items. What I need to do is combine these lists to
produce a third list that contains every version of the items in the second
list.

Example:

List 1
Column A Column B
Widget Red
Widget Green
Widget Blue
Gadget Red
Gadget Yellow
Thingy Purple
Thingy Pink
DooDah Orange
Doodah Green
Doodah Turquoise

List 2
Column A
Gadget
Doodah

List 3 - Desired Output
Gadget Red
Gadget Yellow
DooDah Orange
Doodah Green
Doodah Turquoise

Any ideas? Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Lookup multiple lines

Thanks very much. Just tested it using the example below and it seems perfect.

Michael

"Domenic" wrote:

Assumptions:

A2:B11 contains List 1

D2:D3 contains List 2

Formulas:

F2:

=SUMPRODUCT(COUNTIF(A2:A11,D2:D3))

G2, copied down and across:

=IF(ROWS(G$2:G2)<=$F$2,INDEX(A$2:A$11,SMALL(IF(ISN UMBER(MATCH($A$2:$A$11,
$D$2:$D$3,0)),ROW($A$2:$A$11)-ROW($A$2)+1),ROWS(G$2:G2))),"")

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

In article ,
Freeflyer wrote:

Hi,

Not sure if this is possible using functions or if it requires a macro.
I have two lists, one containing all possible variations of items and one
containing a list of items. What I need to do is combine these lists to
produce a third list that contains every version of the items in the second
list.

Example:

List 1
Column A Column B
Widget Red
Widget Green
Widget Blue
Gadget Red
Gadget Yellow
Thingy Purple
Thingy Pink
DooDah Orange
Doodah Green
Doodah Turquoise

List 2
Column A
Gadget
Doodah

List 3 - Desired Output
Gadget Red
Gadget Yellow
DooDah Orange
Doodah Green
Doodah Turquoise

Any ideas? Thanks.


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
Is it possible to have a multiple lookup formula. Arul T Excel Discussion (Misc queries) 1 April 20th 06 10:17 AM
multi sheet lookup with multiple results Alec H Excel Discussion (Misc queries) 1 March 10th 06 08:05 PM
multiple lines Rhonda Excel Discussion (Misc queries) 3 July 6th 05 12:15 AM
Conditional Lookup on Multiple Criteria TBarker Excel Worksheet Functions 1 June 22nd 05 12:28 AM
lookup multiple occurrences of a value excel ckl Excel Worksheet Functions 5 February 3rd 05 05:19 AM


All times are GMT +1. The time now is 07:15 AM.

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"