Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lo3t3ch
 
Posts: n/a
Default Returning multiple instances of the same lookup value

How can I have a lookup (or other function) find all values in column A that
match my lookup value? Simplified Example:
A B
1 cat
1 dog
2 bird
3 hamster
3 fish

I would like to look up "1" and have it return both "cat" and "dog", not
just "cat".
Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Returning multiple instances of the same lookup value

Hi!

One way:

C1 = lookup value

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=IF(ROWS($1:1)<=COUNTIF(A$1:A$5,C$1),INDEX(B$1:B$5 ,SMALL(IF(A$1:A$5=C$1,ROW(A$1:A$5)-ROW(A$1)+1),ROWS($1:1))),"")

Copy down until you get blanks.

Biff

"lo3t3ch" wrote in message
...
How can I have a lookup (or other function) find all values in column A
that
match my lookup value? Simplified Example:
A B
1 cat
1 dog
2 bird
3 hamster
3 fish

I would like to look up "1" and have it return both "cat" and "dog", not
just "cat".
Is this possible?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default Returning multiple instances of the same lookup value

Have you considered a pivot table?
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"lo3t3ch" wrote in message
...
How can I have a lookup (or other function) find all values in column A
that
match my lookup value? Simplified Example:
A B
1 cat
1 dog
2 bird
3 hamster
3 fish

I would like to look up "1" and have it return both "cat" and "dog", not
just "cat".
Is this possible?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lo3t3ch
 
Posts: n/a
Default Returning multiple instances of the same lookup value

It appears to be getting the correct number of responses, but I'm only
getting "#VALUE!" for responses.

"Biff" wrote:

Hi!

One way:

C1 = lookup value

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=IF(ROWS($1:1)<=COUNTIF(A$1:A$5,C$1),INDEX(B$1:B$5 ,SMALL(IF(A$1:A$5=C$1,ROW(A$1:A$5)-ROW(A$1)+1),ROWS($1:1))),"")

Copy down until you get blanks.

Biff

"lo3t3ch" wrote in message
...
How can I have a lookup (or other function) find all values in column A
that
match my lookup value? Simplified Example:
A B
1 cat
1 dog
2 bird
3 hamster
3 fish

I would like to look up "1" and have it return both "cat" and "dog", not
just "cat".
Is this possible?




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Wright
 
Posts: n/a
Default Returning multiple instances of the same lookup value

Do you need it to do something that Data / Filter / Autofilter will not do?

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------


"lo3t3ch" wrote in message
...
How can I have a lookup (or other function) find all values in column A
that
match my lookup value? Simplified Example:
A B
1 cat
1 dog
2 bird
3 hamster
3 fish

I would like to look up "1" and have it return both "cat" and "dog", not
just "cat".
Is this possible?





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Returning multiple instances of the same lookup value

Hi!

You probably didn't enter the formula as an array.

Type the formula then hold down the CTRL key and the SHIFT key then hit
ENTER.

Biff

"lo3t3ch" wrote in message
...
It appears to be getting the correct number of responses, but I'm only
getting "#VALUE!" for responses.

"Biff" wrote:

Hi!

One way:

C1 = lookup value

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=IF(ROWS($1:1)<=COUNTIF(A$1:A$5,C$1),INDEX(B$1:B$5 ,SMALL(IF(A$1:A$5=C$1,ROW(A$1:A$5)-ROW(A$1)+1),ROWS($1:1))),"")

Copy down until you get blanks.

Biff

"lo3t3ch" wrote in message
...
How can I have a lookup (or other function) find all values in column A
that
match my lookup value? Simplified Example:
A B
1 cat
1 dog
2 bird
3 hamster
3 fish

I would like to look up "1" and have it return both "cat" and "dog",
not
just "cat".
Is this possible?






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default Returning multiple instances of the same lookup value

Hi,

Suppose your data is in the range A1:B7. In A10, you enter the digit 1 or
what ever you are looking for. In B10 enter the following array formula
(Ctrl+Shift+Enter)

=IF(ISERROR(INDEX($A$1:$B$7,SMALL(IF($A$1:$A$7=$A$ 10,ROW($A$1:$A$7)),ROW(1:1)),2)),"",INDEX($A$1:$B$ 7,SMALL(IF($A$1:$A$7=$A$10,ROW($A$1:$A$7)),ROW(1:1 )),2))

Copy this formula down.

Regards,

Ashish Mathur

"lo3t3ch" wrote:

How can I have a lookup (or other function) find all values in column A that
match my lookup value? Simplified Example:
A B
1 cat
1 dog
2 bird
3 hamster
3 fish

I would like to look up "1" and have it return both "cat" and "dog", not
just "cat".
Is this possible?

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lo3t3ch
 
Posts: n/a
Default Returning multiple instances of the same lookup value

Thanks. That was the problem.
I never would have figured that out.

"Biff" wrote:

Hi!

You probably didn't enter the formula as an array.

Type the formula then hold down the CTRL key and the SHIFT key then hit
ENTER.

Biff

"lo3t3ch" wrote in message
...
It appears to be getting the correct number of responses, but I'm only
getting "#VALUE!" for responses.

"Biff" wrote:

Hi!

One way:

C1 = lookup value

Entered as an array using the key combo of CTRL,SHIFT,ENTER:

=IF(ROWS($1:1)<=COUNTIF(A$1:A$5,C$1),INDEX(B$1:B$5 ,SMALL(IF(A$1:A$5=C$1,ROW(A$1:A$5)-ROW(A$1)+1),ROWS($1:1))),"")

Copy down until you get blanks.

Biff

"lo3t3ch" wrote in message
...
How can I have a lookup (or other function) find all values in column A
that
match my lookup value? Simplified Example:
A B
1 cat
1 dog
2 bird
3 hamster
3 fish

I would like to look up "1" and have it return both "cat" and "dog",
not
just "cat".
Is this possible?






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
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Why are there multiple instances of same person on shared workshee mcodyw Excel Discussion (Misc queries) 0 March 31st 05 06:55 PM
Multiple lookup value's rucker31 Excel Worksheet Functions 0 March 11th 05 11:17 PM
Return Multiple Results with Lookup Josh O. Excel Worksheet Functions 1 February 4th 05 08:07 PM
opening multiple instances of excel John B Excel Discussion (Misc queries) 4 January 28th 05 11:31 PM


All times are GMT +1. The time now is 05:04 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"