Lookup With Partial Number (1 digits from left, 4 digits from right)

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,077
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all..
i have table the following below.
i want lookup data using formula with criteria:
1. lookup from 1 digits number from left and 4 digits number from right.
2. length number is always 10 digits.
3. don't use helper column ( formula in single column)
4. not use macro
29_PMK.06_2010PerLampI.XLS
EF
3datadescription
45020405002Blackberry
55020405003Mangoes
63170106005Pear
73170106006Tomato
82010103000Potato
92010103002Banana
10
11lookuptarget
1255002Blackberry
1323002Banana
143600?
15etc..
Sheet2


any help, thank in advance.
.sst
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Assuming your actual lookup table is expanded to include rows 12 through 100 (change to suit), in F4 and copy down:

=VLOOKUP(VALUE(LEFT(E4,1)&RIGHT(E4,4)),$E$12:$F$100,2,0)
 
Upvote 0
Assuming your actual lookup table is expanded to include rows 12 through 100 (change to suit), in F4 and copy down:

=VLOOKUP(VALUE(LEFT(E4,1)&RIGHT(E4,4)),$E$12:$F$100,2,0)

hi Joe, still not work #N/A
 
Upvote 0
here..
29_PMK.06_2010PerLampI.XLS
EF
3datadescription
45020405002Blackberry
55020405003Mangoes
63170106005Pear
73170106006Tomato
82010103000Potato
92010103002Banana
10
11lookuptarget
12550020
1323002#N/A
Sheet2
Cell Formulas
RangeFormula
F12:F13F12=VLOOKUP(VALUE(LEFT(E4,1)&RIGHT(E4,4)),$E$12:$F$16,2,0)
 
Upvote 0
I don't think you will do this without either duplicating the table with the "NEW" numbers OR creating a helper column....OR of course a VBA solution
 
Upvote 0
I don't think you will do this without either duplicating the table with the "NEW" numbers OR creating a helper column....OR of course a VBA solution
hi Michael, for a reason and for this moment, i don't use helper column & don't use vba too
 
Upvote 0
If you cannot get expected result like me, apply the formula with Ctrl+Shift+Enter.
Book1.xlsx
AB
1datadescription
25020405002Blackberry
35020405003Mangoes
43170106005Pear
53170106006Tomato
62010103000Potato
72010103002Banana
8
9lookuptarget
1055002Blackberry
1123002Banana
Sheet1
Cell Formulas
RangeFormula
B10:B11B10=LOOKUP(1,0/(LEFT(A$2:A$7)&RIGHT(A$2:A$7,4)=A10&""),B$2:B$7)
 
Upvote 0
How about creating the table again similar to your posr
Book1
EF
2
3datadescription
45020405002Blackberry
55020405003Mangoes
63170106005Pear
73170106006Tomato
82010103000Potato
92010103002Banana
10
11lookuptarget
1255002Blackberry
1355003Mangoes
1436005Pear
1536006Tomato
1623000Potato
1723002Banana
Sheet1
Cell Formulas
RangeFormula
E12:E17E12=VALUE(LEFT(E4,1)&RIGHT(E4,4))
F12:F17F12=IF(VALUE(LEFT(E4,1)&RIGHT(E4,4))=VALUE(E12),VLOOKUP(E4,$E$4:$F$9,2,0))
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,383
Members
448,955
Latest member
BatCoder

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