Advice on vlookup across text and numbers?

sing2trees1983

New Member
Joined
Feb 3, 2006
Messages
26
Hello everyone. I have a list of "numbers" which consists of three letters followed by six numbers. Batches will belong to different clients. E.g. ABC100000 to ABC110000 belongs to client A, ABC110001 to ABC120000 belongs to client B etc.
I would really like members of staff to enter a number and the vlookup function will show the client. Is it possible to do this without listing all the number range options individually?
Hope that makes sense and a huge thank you for your help in advance!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Maybe something like this?
A​
B​
C​
D​
E​
2​
ABC100000
10​
100003​
40​
3​
ABC100001
20​
4​
ABC100002
30​
5​
ABC100003
40​
6​
ABC100004
50​
7​
ABC100005
60​
8​
ABC110001
70​
9​
ABC110002
80​
10​
ABC110003
90​
11​
ABC110004
100​
12​
ABC110005
110​
E2=VLOOKUP("ABC"&D2,$A$2:$B$12,2,0)
 
Upvote 0
Thanks so much for that - but is there a way of doing it where I don't need to type out every single possible number combination?
E.g not having to type:
ABC100000
ABC100001
ABC100002
ABC100003
all the way to
ABC110005?

Basically something that says if the text/number is between ABC100000 and ABC110000 then it is client A etc. Plus the letters may change, so another client might be DEF100000
 
Upvote 0
If they will all always have the same 1st letters, then you can pretty much skip using them for this. I suggest you will make a small table with your ranges, but you only need the upper and lower value of each range...
F​
G​
H​
I​
2​
100000​
10​
110011​
20​
3​
100005​
10​
4​
110000​
20​
5​
110005​
20​
6​
120000​
30​
7​
120005​
30​
Then pretty much the same formula...
I2=VLOOKUP(H2,$F$2:$G$7,2,1)
note that I used 1 at the end instead of 0
 
Upvote 0

Forum statistics

Threads
1,216,216
Messages
6,129,566
Members
449,517
Latest member
Lsmich

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