vlookup laste 6 digit.

Vanda_a

Well-known Member
Joined
Oct 29, 2012
Messages
934
hello all. please help me out with this.

in sheet1 I have a data with 13digit barcode.
and in sheet2. I have only last 6digit of the barcode.
Can I use vlookup for this thing? vlookup 6digit to the 13digit barcode.

Thanks for help
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Here's some additional information you may find useful.

=LOOKUP(9.99999999999999E+307,FIND($C1&"|",$A$2:$A$3&"|"),A$2:A$3)
You're searching strings that are 13 characters long and you want to look at the last 6 characters in those strings.

If the FIND function finds the last 6 characters it will return the number 8 (the starting character postion of the 6 character look up value).

For example:

1234567890123

The lookup value is 890123. The FIND function will return 8 because the lookup value 890123 is found starting at character number 8 within the string 1234567890123.

So, in this application the FIND function can only return 2 variables: the #VALUE! error when the lookup value is not found or the number 8 when the look value is found.

In this application, the lookup value:

=LOOKUP(lookup_value,...)

Simply needs to be larger than any number returned by the FIND function. The largest number that the FIND function can return is 8 so all we need for a lookup value is a number greater than 8.

Therefore, we can save a few keystrokes by using a smaller lookup value:

=LOOKUP(9,...)
 
Upvote 0

Forum statistics

Threads
1,215,091
Messages
6,123,062
Members
449,089
Latest member
ikke

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