View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JMB
 
Posts: n/a
Default VLOOKUP - more than one return required

One way, let's say the column that contains your keys is in L1:L10, the
column with the data you want returned is in M1:M10, and K1 contains the
value you want to look up:

IF(ROW()COUNTIF($L$1:$L$10,$K$1),"",INDEX($M$1:$M $10,SMALL(IF($L$1:$L$10=$K$1,ROW(INDIRECT("1:"&ROW S($L$1:$L$10))),""),ROW())))

The item that will be returned will be dependent on the row in which the
formula is entered (if entered in cell C8, it will return the 8th item). You
could use a cell reference that specifies which item to return instead of
Row(), then you're not locked into having to enter the formula in a specific
row.

"luvthavodka" wrote:

My range of data (table array) has more than one row that meet the VLOOKUP
criteria I have set.

I have a VLOOKUP in eg A1 =VLOOKUP($K$1,Order_Log,6,FALSE). In this I want
the first value to be returned (as VLOOKUP does per standard, using FALSE).
This I can do.

In cell A2 however, I would like to return the 2nd value from my range of
data.

In cell A3, the 3rd ....and so on (only up until around the 6th value).

What do I need to add into my A1 formula, for the 2nd value to be returned
in A2? I guessed it may be as easy as FALSE +1, but this does not seem to
work!

Many thanks

Jenny