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
 

Pumperkin

New Member
Joined
Jan 24, 2019
Messages
42
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
Joined
May 17, 2017
Messages
3
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
Joined
Jan 24, 2019
Messages
42
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
Joined
Apr 29, 2016
Messages
144
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:

Forum statistics

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

Some videos you may like

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...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top