View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] barbetta3141@yahoo.com is offline
external usenet poster
 
Posts: 20
Default return previous date from list

Thanks everyone!

Domenic wrote:
Assuming that A2:B8 contains the data, try...

=INDEX(B2:B8,MATCH(D2,A2:A8)+(LOOKUP(D2,A2:A8)<D2 ))

To return 12.7 for dates earlier than 1/1/98, try the following formula
instead...

=IF(D2<"",IF(D2A2,INDEX(B2:B8,MATCH(D2,A2:A8)+(L OOKUP(D2,A2:A8)<D2)),B
2),"")

Hope this helps!

In article .com,
wrote:

In columns A & B, I have a list of dates and values, such as:

1/1/1998 12.7
3/10/1998 10.4
7/24/1998 14.6
8/3/1998 7.2
8/17/1998 42.4
12/10/1998 3.3
2/20/1999 12.7

Is there a formula that, upon entering a date, will look up the value
corresponding to the next date in the list (if there's no exact match)?
For example, if I enter 3/24/1998 in, say, cell D1, the formula would
return 14.6.