# Lookup between alphanumeric range?

#### YankeeruinX

##### New Member
Hello,

Probably being thick here and the obvious answer is alluding me but I need a formula to return a value based on where something is between a range of alphanumeric characters. At a basic level something like the below:

 Start Location End Location Who A001 A100 MT A101 A200 CH B001 B050 RH B051 B150 AH

<tbody>
</tbody>

So If I put in a location of say A053 it would return MT, B041 would return RH and so on. Been scratching my head over this for a while now and tried googling for an answer but to be honest I'm not even sure what to call this type of lookup.

If anyone could point me in the right direction it would be greatly appreciated.

Kind regards

#### Pumperkin

##### New Member
Hi,

Do you have an example of how the data actually looks? If necessary change the location - I just want to see how your data is laid out

#### YankeeruinX

##### New Member
I don't at the minute, just got an email through asking for a formula for a table like the above from the powers that be. Have asked him for the actual data so will see if that differs much to what he originally sent through. These are storage locations so there will be thousands of them hence the range between start/end and then see who is responsible for them.

#### Pumperkin

##### New Member
I don't at the minute, just got an email through asking for a formula for a table like the above from the powers that be. Have asked him for the actual data so will see if that differs much to what he originally sent through. These are storage locations so there will be thousands of them hence the range between start/end and then see who is responsible for them.
OK. Well at the moment I'm thinking a massive IF formula - depends how many you have as pickers though. Formula as follows (Assuming you are starting in A1 and your Location data is in E1).
Code:
``=IF(E1<=B2,C2,IF(E1<=B3,C3,IF(E1<=B4,C4,IF(E1<=B5,C5,"Other"))))``

#### Phuoc

##### Board Regular
Try this:

=LOOKUP(2,1/(\$A\$2:\$A\$5<=G1)/(\$B\$2:\$B\$5>=G1),\$C\$2:\$C\$5)

=LOOKUP(2,1/(Start Location<=G1)/(End Location>=G1),Who)

Last edited:

1,082,295
Messages
5,364,359
Members
400,792
Latest member
Dxmiian

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...