View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Lookup with Multiple results

Typo:

Assume your data is in the range B2:B110 and K2:K100.


Should be:

Assume your data is in the range B2:B100 and K2:K100.

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
One way...

Enter the date of interest in cell A1.

Assume your data is in the range B2:B110 and K2:K100.

Enter this array formula** in cell A2 and copy down until you get blanks:

=IF(ROWS(A$2:A2)<=COUNTIF(K$2:K$100,A$1),INDEX(B$2 :B$100,SMALL(IF(K$2:K$100=A$1,ROW(B$2:B$100)-MIN(ROW(B$2))+1),ROWS(B$2:B2))),"")

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

The other big problem comes because the data comes
from an updatable DB and when I extract the data i dont
know exactly how many matching dates im going to have.


You'd have to rely on past knowledge. For example, if you know the most
matching dates that there has ever been is say, 30, then you have to copy
the formula to at least 30 cells.


--
Biff
Microsoft Excel MVP


"Quovardis via OfficeKB.com" <u38145@uwe wrote in message
news:798f9f55e2f2f@uwe...
Hi,

Im using Lookup to find a date in one column then return a value in the
same
row but different column:

=LOOKUP(DATE(2007,10,10),$K$64,$B$64)

This works well but my problem is that I have the same instance of the
same
date in the same column but the return value is different every
time....e.g

Column B Column K
White 2007/10/10
Red 2007/10/9
Blue 2007/10/10
Black 2007/09/5

I want to be able to view for instance White & Red in A1:A2 for instance.
I may have 20 instances of the correct date so I have to return 20
results in
different rows of the same column.

How can I set up the 20 Row cells to individually pick up a result if it
exists.

The other big problem comes because the data comes from an updatable DB
and
when I extract the data i dont know exactly how many matching dates im
going
to have.

I hope someone can help with this as I cant find anything that helps.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200710/1