View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default return previous date from list

Try something like this:

D1: (a date to find)
E1:
=IF(ISNA(VLOOKUP(D1,A1:A7,B1:B7,0)),INDEX(B1:B7,MA TCH(D1,A1:A7,1)+1),VLOOKUP(D1,A1:B7,2,0))

If the formula finds an exact match in Col_A, it uses the respective value
from Col_B. Otherwise, it pulls the Col_B value from the next row.


Is that something you can work with?

***********
Regards,
Ron

XL2002, WinXP


" 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.