ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Check the interval of a cell withni a range of values (https://www.excelbanter.com/excel-discussion-misc-queries/176801-check-interval-cell-withni-range-values.html)

dakke

Check the interval of a cell withni a range of values
 
Suppose the following table:
**********
* A * B *
************
************
1 ** 1 * B1 *
2 ** 5 * B2 *
3 ** 8 * B3 *
4 ** 20 * B4 *
***********
and a cell with number 4.

I would like to get B1 displayed, since the number 4 is bigger than A1
(namely '1', but smaller than A2 ('5'). Is this possible using functions?

JMB

Check the interval of a cell withni a range of values
 
where the value to look up is in C1, you could try:
=VLOOKUP(C1,A1:B4,2,TRUE)


"dakke" wrote:

Suppose the following table:
**********
* A * B *
************
************
1 ** 1 * B1 *
2 ** 5 * B2 *
3 ** 8 * B3 *
4 ** 20 * B4 *
***********
and a cell with number 4.

I would like to get B1 displayed, since the number 4 is bigger than A1
(namely '1', but smaller than A2 ('5'). Is this possible using functions?



All times are GMT +1. The time now is 08:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com