View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Laury Laury is offline
external usenet poster
 
Posts: 14
Default Min with a match?

I have a working formula to find a min. value w/in a criteria set. Part of
the criteria is that the dates need to be within plus or minus 30 days of the
original date.
=MIN(IF(($D$9:$D$16=$D5)*(($A5-($A$9:$A$16))<31)*(($A5-($A$9:$A$16))-31),$B$9:$B$16," "))

Now I need to find the lowest min in the same set, AND it has to match in
both the <31 days and the -31 days. So, for ex: If the orig min value were
$2.50 on 3/1/07 - I need to now verify that 2.50 exists on both sides of the
timeframe (i.e. 2.50 on 2/15/07 and 2.50 on 3/15/07). If not, then I need to
return the closest to the min value that does exist in both. Can this be
done with a formula? I don't know how to write code. Any help would be
greatly appreciated.