How to select the number in excel?

E

Eric

Number for the list
A1, B1,C1,D1,E1,F1
144,150,152,156,160,162

Input number in A10
155

I would like to select the number from the list,
which number is just above 155 from the list? then return 156 in A9
which number is just below 155 from the list? then return 152 in A11

Does anyone know how to do it in excel?
Thank you in advance
Eric
 
B

Biff

Hi!

Can the input number be 0? If so, what results would you expect?

Are the series of numbers always in ascending order?

Biff
 
B

Biff

These formulas need to be entered as arrays. Use the key combo of
CTRL,SHIFT,ENTER:

For the next lowest number:

=IF(A10="","",IF(A10<=MIN(A1:F1),"No lower value",MAX(IF(A1:F1<A10,A1:F1))))

For the next highest number:

=IF(A10="","",IF(A10>=MAX(A1:F1),"No higher
value",MIN(IF(A1:F1>A10,A1:F1))))

Biff
 
Top