Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Find and return multiple values

Hi,
I've an urgent question here in regards to return multiple values and hope
you can help.

Sheet1
A B C D E ...
1 1001
2 1002
3 1003
4 1004

Sheet2
A B
1 1002 Y01
2 1001 B01
3 1004 Z08
4 1001 D04
5 1001 J05
6 1004 H22

Let's say in Sheet1 cell B1, I type in =vlookup(A1, Sheet2!A:B,2,false), it
returns the value "B01". Is it possible to type in formula in cell C1, D1 to
return the remaining match, which are "D04" and "J05"?

Your reply is much appreciated,
BubbleGum
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Find and return multiple values

Try in B1:
=INDEX(Sheet2!$B$1:$B$6,SMALL(IF(Sheet2!$A$1:$A$6= $A1,ROW(Sheet2!$B$1:$B$6)-ROW(Sheet2!$B$1)+1),COLUMNS($B1:B1)))

array entered w/ Cntrl+Shift+Enter. Copy across until you get #NUM

If you prefer blank instead of #NUM then try

=IF(SUM(--(Sheet2!$A$1:$A$6=$A1))<COLUMNS($B1:B1),"",INDEX(S heet2!$B$1:$B$6,SMALL(IF(Sheet2!$A$1:$A$6=$A1,ROW( Sheet2!$B$1:$B$6)-ROW(Sheet2!$B$1)+1),COLUMNS($B1:B1))))

also array entered.



"BubbleGum" wrote:

Hi,
I've an urgent question here in regards to return multiple values and hope
you can help.

Sheet1
A B C D E ...
1 1001
2 1002
3 1003
4 1004

Sheet2
A B
1 1002 Y01
2 1001 B01
3 1004 Z08
4 1001 D04
5 1001 J05
6 1004 H22

Let's say in Sheet1 cell B1, I type in =vlookup(A1, Sheet2!A:B,2,false), it
returns the value "B01". Is it possible to type in formula in cell C1, D1 to
return the remaining match, which are "D04" and "J05"?

Your reply is much appreciated,
BubbleGum

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 208
Default Find and return multiple values

Enter this array formula in B1
=IF( COLUMNS( $B1:B1 ) COUNTIF( Sheet2!$A$1:$A$6, $A1 ), "-", INDEX(
Sheet2!$B:$B, SMALL( IF( $A1 = Sheet2!$A$1:$A$6, ROW( Sheet2!$A$1:$A$6 ) ),
COLUMNS( $B1:B1 ) ) ) )

Drag/Fill as needed...
--
Regards,
Luc.

"Festina Lente"


"BubbleGum" wrote:

Hi,
I've an urgent question here in regards to return multiple values and hope
you can help.

Sheet1
A B C D E ...
1 1001
2 1002
3 1003
4 1004

Sheet2
A B
1 1002 Y01
2 1001 B01
3 1004 Z08
4 1001 D04
5 1001 J05
6 1004 H22

Let's say in Sheet1 cell B1, I type in =vlookup(A1, Sheet2!A:B,2,false), it
returns the value "B01". Is it possible to type in formula in cell C1, D1 to
return the remaining match, which are "D04" and "J05"?

Your reply is much appreciated,
BubbleGum

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
Lookup in Multiple Columns, Return Multiple Values andy62 Excel Worksheet Functions 3 July 6th 06 02:36 AM
find largest values, then return corresponding row values. neurotypical Excel Discussion (Misc queries) 7 May 24th 06 10:27 PM
Find Multiple instances of Single Criterion in Row & Return To a Single Col Sam via OfficeKB.com Excel Worksheet Functions 16 May 10th 06 03:00 AM
Find two values in worksheet to return one value Correna Excel Worksheet Functions 10 May 4th 06 10:22 PM
Look up one value and return multiple corresponding values in exce Morphis Excel Discussion (Misc queries) 6 March 31st 06 02:20 AM


All times are GMT +1. The time now is 10:17 PM.

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

About Us

"It's about Microsoft Excel"