Re: Returning multiple instances of the same lookup value

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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" <lo3t3ch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A2EB6B4F-01D4-46D6-A739-638B738B8EA9@xxxxxxxxxxxxxxxx
> 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" <lo3t3ch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:F895986E-CDB6-4DD1-A4E0-AC6E608AC924@xxxxxxxxxxxxxxxx
>> > 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?
>>
>>
>>


.



Relevant Pages

  • Re: Index / Match
    ... "Biff" wrote: ... It will return an array of 1 or 0. ... Since the lookup value is 1 a match is found at the 4th position so the ... result of the formula is the value in cell A5 which is the 4th cell in ...
    (microsoft.public.excel.worksheet.functions)
  • Re: The Kth element in a text list
    ... I have a bunch of formulae (e.g. LOOKUP, ... We use COUNTIF, < etc. because it is TEXT. ... =SMALL) for all numbers and no blanks. ... Or, an array formula: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Need help with INDEX lookup
    ... type of data the lookup formula is returning and how complex the lookup ... And if you have to include sheet names then that makes it even longer! ... all of the lookup formulas are array formulas so they need to ... Microsoft Excel MVP ...
    (microsoft.public.excel.worksheet.functions)
  • Re: how to return mulitple corresponding values
    ... thanks for the input roger. ... The argument for the SMALLfunction that Biff proposed was ROW ... Try this: (array entered) ... i have a sheet listing jobs scheduled by managers. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Make Excel work faster
    ... Sub StartSW() ... Select Case MsgBox("Use VLookup?", _ ... "array lookup tester") ... It is practically impossible to get even near the speed of Excel's built-in (lookup) functions. ...
    (microsoft.public.excel.programming)