Thread: Lookup Hi / Lo
View Single Post
  #9   Report Post  
Domenic
 
Posts: n/a
Default

Yeah, I think the formula should return #N/A. In which case, your
formula would provide the correct result. Thanks Harlan!

In article . com,
"Harlan Grove" wrote:

Boundary conditions. I'll grant that when C16 = 10, the smallest value
in the list greater than C16 should be 14 rather than #N/A. However, if
C16 were 300, what should the formula return? 0 (which your formula
does) or #N/A (which provides symmetry with the LOOKUP call when C16 =
10)? If it should return #N/A, then perhaps it should resemble

=IF(C16<B5,B5,INDEX(B5:B13,MATCH(C16,B5:B13)+1))


So maybe I should have made it return #N/A.

=IF(C16<B5,B5,IF(C16=B13,#N/A,INDEX(B5:B13,MATCH(C16,B5:B12)+1)))