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:

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Start Location[/TD]
[TD]End Location[/TD]
[TD]Who[/TD]
[/TR]
[TR]
[TD]A001[/TD]
[TD]A100[/TD]
[TD]MT[/TD]
[/TR]
[TR]
[TD]A101[/TD]
[TD]A200[/TD]
[TD]CH[/TD]
[/TR]
[TR]
[TD]B001[/TD]
[TD]B050[/TD]
[TD]RH[/TD]
[/TR]
[TR]
[TD]B051[/TD]
[TD]B150[/TD]
[TD]AH[/TD]
[/TR]
</tbody>[/TABLE]

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

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
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,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

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