Lookup between alphanumeric range?

YankeeruinX

New Member
Joined
May 17, 2017
Messages
3
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 LocationEnd LocationWho
A001A100MT
A101A200CH
B001B050RH
B051B150AH

<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
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
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 :)
 
Upvote 0
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.
 
Upvote 0
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"))))
 
Upvote 0
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:
Upvote 0

Forum statistics

Threads
1,214,806
Messages
6,121,667
Members
449,045
Latest member
Marcus05

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top