How to select the number in excel?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Hi!

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

Are the series of numbers always in ascending order?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top