Not very sure, but here's 2 interps to play with ..
Sample constructs at:
http://www.savefile.com/files/6556941
Criteria_Lookup_based_on_Dates_Tyson_gen.xls
Interp1
----------
Assuming the table below is in A1:C6
NAME PLAN Effective Date
ID1 1 01-Jan-05
ID1 3 01-Mar-05
ID2 2 01-Feb-05
ID3 2 01-Mar-05
ID3 4 01-Mar-05
and the "AS OF DATE:" below is in A11
01-Mar-05
(Date formats used above is to remove any ambiguity)
Put in D2, copy down: =IF(C2=$A$11,B2,"")
Interp2
-----------
Assuming the same table as interp1 (in A1:C6)
with the "AS OF DATE:" placed in G2: 01-Mar-05
Put in D2: =IF(COUNTIF($A$2:A2,A2)>1,"",ROW())
Put in E2:
=IF(ISERROR(SMALL(D

,ROW(A1))),"",
INDEX(A:A,MATCH(SMALL(D

,ROW(A1)),D

,0)))
Put in F2, array-enter (press CTRL+SHIFT+ENTER):
=IF(ISNA(MATCH(1,($A$2:$A$6=E2)*($C$2:$C$6=$G$2),0)),"",
INDEX($B$2:$B$6,MATCH(1,($A$2:$A$6=E2)*($C$2:$C$6=$G$2),0)))
Select D2:F2, copy down to F6
Col E returns all the unique IDs, col F returns the specific Plan# (if any)
for the ID with date equal to the "AS OF DATE:" placed in G2: 01-Mar-05. If
there are any duplicate "ID-Date"'s satisfying the criteria, only the 1st
matched Plan# will be returned.
Adapt to suit ..
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--