ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   range search (https://www.excelbanter.com/excel-programming/384225-range-search.html)

[email protected]

range search
 
Hi everyone,

I am trying to search for whether a data is within a range (multiple
ranges).

example:

data value = 1

range 1 = 0 - 3
range 2 = 4 - 5
range 3 = 6 - 10

and so on

if data value is found within a range, the range number is return. in
this case, range 1 will be return


I am doing this for a large number of ranges, if there a way to it?

Thanks
Allen


JMB

range search
 
Set up your ranges like this:

A
1 0
2 4
3 6


=MATCH(1,A1:A3) returns 1
=MATCH(5,A1:A3) returns 2

and so on.



" wrote:

Hi everyone,

I am trying to search for whether a data is within a range (multiple
ranges).

example:

data value = 1

range 1 = 0 - 3
range 2 = 4 - 5
range 3 = 6 - 10

and so on

if data value is found within a range, the range number is return. in
this case, range 1 will be return


I am doing this for a large number of ranges, if there a way to it?

Thanks
Allen




All times are GMT +1. The time now is 12:51 PM.

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