Solved

Range value lookup

Posted on 2013-11-19
2
239 Views
Last Modified: 2013-11-19
Hi,

I have a range such as this

ID start          ID End
1200              1299
1300              1399
1400              1499
1500              1599
1600              1699

Now I have an ID say 1378

How do I lookup this id in the range above using formulas?

Thanks!
0
Comment
Question by:Shanan212
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 39660576
Assuming that data is in A2:B6, and your lookup value of 1378 is in E2, this will tell you the row number within that range that the number falls in:

=MATCH(1,INDEX(($A$2:$A$6<=E2)*($B$2:$B$6>=E2),0),0)

You can wrap and INDEX() around to get corresponding date in same row.

e.g.

=INDEX($C$2:$C$6,MATCH(1,INDEX(($A$2:$A$6<=E2)*($B$2:$B$6>=E2),0),0))
0
 
LVL 23

Expert Comment

by:NBVC
ID: 39660583
Or actually simpler:

=MATCH(E2,$A$2:$A$6)

since they are listed in ascending order and no gaps in ranges.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question