Solved

Range value lookup

Posted on 2013-11-19
2
240 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

630 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