Find a value in 2-column array

asallwey

Board Regular
Joined
Jul 26, 2005
Messages
101
I'm having brain fade and need help. I have a list of drills, coded as to type, in column A, in B is their decimal size. Users don't always know the size, but do know the code. The code field is formatted as Text because of the coding. The array is sorted in decimal order (numeric format).

The use is to enter the drill code and have the decimal size retrieved. I think I've done this before but just have a road block.

Here is the coding:
# 00 = #'d Drills
ms12 = machine screws ( 12 in this case)
M00 = metric drills
1/2 = fractional drills

Here is sample data:
col A Col B
ms0 0.0600
1/16 0.0625
M1.6 0.0630
#52 0.0635
#51 0.0670
#50 0.0700
ms1 0.0730

Thanks, Alex
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
You want a VLOOKUP or (if you have 365) an XLOOKUP.
 
Upvote 0
How about
Excel Formula:
=VLOOKUP(F2,A2:B8,2,0)
where F2 is the cell you enter the code into.
 
Upvote 0
The data doesn't need to be sorted.
+Fluff 1.xlsm
ABCDEFG
1
2ms00.06#510.067
31/160.0625ms00.06
4M1.60.063ms10.073
5#520.0635m1.60.063
6#510.0671/160.0625
7#500.07
8ms10.073
9
Data
Cell Formulas
RangeFormula
G2:G6G2=VLOOKUP(F2,$A$2:$B$8,2,0)
 
Upvote 0
Solution
Well, I can't explain it. I went back to my sheet after reading your reply and it was working. I played with it several time before posting and it wouldn't work. It's working now.

Thanks for helping! Alex
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
I just found out why it didn't work for me! I didn't include the 4th element of the formula, it needed False or 0 to retrieve the correct answer. I guess the last few times I've used vlookup I didn't need it, and this time my brain didn't see it, even when I looked at your example. Tunnel vision can add quite a challenge sometimes! Thanks again! Alex
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,638
Members
449,093
Latest member
Ahmad123098

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