Vlookup alphanumeric cells in a range

Demona26

New Member
Joined
Feb 22, 2018
Messages
40
Office Version
  1. 365
Platform
  1. Windows
Hello. I am trying to look up alphanumeric values against an alphanumeric range.
I can do this against an all-number range, but can't figure out the alphanumeric equivalent. The challenge is that, because it is alphanumeric, I can't define a clear range for Excel.

In my numeric lookup, if the value 12345 appears in cell A2, I can return the value "Yes" because the vlookup range is defined.

=vlookup(A2,D2:F2,3,true)

[TABLE="class: grid, width: 200"]
<tbody>[TR]
[TD][/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Low[/TD]
[TD]High[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]12000[/TD]
[TD]12999[/TD]
[TD]Yes[/TD]
[/TR]
</tbody>[/TABLE]

In the alpha numeric version, I don't know what to put in the range, or how to have Excel find a partial match of an alphanumeric code.
An example of a value I am trying to find is: 0001234AD78D.
All of the alphanumeric values I want to find will start with 000123, and they (should) all be 12 characters long.

Suggestions?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Can you use an IF formula?

=IF(AND(A2>=D3, A2<=E3), F2,"")
 
Upvote 0
I could, but how do I define the alphanumeric range? The formula works fine with an all numeric number - I just don't know how to define the range for the alphanumeric lookup.
 
Upvote 0
I need more info from your data. Can you provide a more-complete example of your data and what you're trying to do with it?
 
Upvote 0
Thank you for looking into this.

I have a spreadsheet of serial numbers. Some are all numeric and some are alphanumeric. I am using a vlookup range to identify the type of equipment based on the SN range.

The end result I'm looking for is as follows, where Vlookup is used in cells B2:B6 to find out what type of unit it is based on the serial number using the formula =Vlookup(A2,Sheet1!$J$1:$L$3,3,TRUE)

[TABLE="class: grid, width: 200, align: left"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Serial Number[/TD]
[TD]Type[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]0001234AB74C[/TD]
[TD]Modem
[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]0001234EG89L[/TD]
[TD]Modem[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]123456[/TD]
[TD]Transmitter[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]789123[/TD]
[TD]Server[/TD]
[/TR]
</tbody>[/TABLE]










My Reference page on Sheet 1 will look like this with the "?" indicating that I don't know what to enter

[TABLE="class: outer_border, width: 200"]
<tbody>[TR]
[TD][/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]100000[/TD]
[TD]699999[/TD]
[TD]Transmitter[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]700000[/TD]
[TD]999999[/TD]
[TD]Server[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="align: center"]?[/TD]
[TD="align: center"]?[/TD]
[TD]Modem[/TD]
[/TR]
</tbody>[/TABLE]

So the formula works fine with the numeric numbers as I can define a range for it to fall in. Lines 3 & 4 work fine.
I'm stuck on what to enter into cells J3 and K3 in order to find a range for Excel to look up the alphanumeric serial number in.
 
Upvote 0
Use this formula in A2 instead of vlookup:

=INDEX($L$1:$L$3,MATCH(A2,$J$1:$J$3))

Then, J3 can be '000123 (make sure to include the apostrophe to ensure a text value). K3 can be blank unless you have modem ranges to further define subgroups.
 
Upvote 0
This kind of worked...it's still correctly picking up all the numeric values. But I have a serial number that is 0006398AEFKL and a different piece of equipment that starts with AST12345. The formula is identifying all of the AST serial numbers as modems, and I still get errors for all of the ones starting with 000639. Not sure what I am doing wrong?
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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