View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Vlookup with multiple results

Try this....

rng1 refers to Sheet h C2:C2009
rng2 refers to Sheet h F2:F2009

The sheet where you want this data extracted to:

A1 = lookup value (could be a drop down list)

Enter this formula in A2 and copy down 25 rows to A26:

=IF(ROWS(A$2:A2)<=COUNTIF(rng1,A$1),INDEX(rng2,MAT CH(A$1,rng1,0)+ROWS(A$2:A2)-1),"")

--
Biff
Microsoft Excel MVP


"M.A.Tyler" <Great Lakes State wrote in message
...

Yes and yes
contiguous & could be less.

"T. Valko" wrote:

Would like to "lookup" all instances of 1 or 2 or 3


Is your date sorted or grouped together so that all the 1s, 2s, 3s etc
are
in a contiguous range or are they in random locations?

Grouped...Random
1...............2
1...............1
1...............2
2...............3
2...............3
3...............1
3...............3
3...............1

There will never be more than 25 results


But there may be less?


--
Biff
Microsoft Excel MVP


"M.A.Tyler" <Great Lakes State wrote in message
...
Thanks very much for the guidence, very helpful. Although I don't
understand
the Index portion. If you recall I need to index column F, but the
example
shown indexes the entire array? For my purposes, that would be Sheet h!
C2:F2009? Would it be possible to explain the index portion? Perhaps
including the "2" at the end?

Thanks for your trouble!

"Gary''s Student" wrote:

The topic of looking up more than a single instance is well-covered
in:

http://office.microsoft.com/en-us/ex...260381033.aspx
--
Gary''s Student - gsnu200827


"M.A.Tyler" wrote:

The data is on Sheet h! A2:DN2009, however I'm only conserned with
two
columns, C & F. Would like to "lookup" all instances of 1 or 2 or
3....(and
so on) from Sheet h!C2:C2009, and populate Sheet1!A1:A25 with the
data
from
the coresponding rows from Sheet h! Column F. (There will never be
more
than
25 results) There is room for a drop down on Sheet1! A1 that would
allow for
the selection of the lookup value (between 1 & 15).

Looking for suggestions!

Thanks,

M.A.Tyler