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
 
You can even use Vlookup function with wildcard character
for example in vlookup value try this "*" & Cell reference for the value you want to look for

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
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
May be if you post small sample of your input and output requirement i might be able to help you out with your second requirement
 
Upvote 0
I just realized i am mistaken here. Wildcard Character can only be used for text and not numbers

You can even use Vlookup function with wildcard character
for example in vlookup value try this "*" & Cell reference for the value you want to look for
 
Upvote 0
=INDEX($A$1:$A$1000,MATCH("*"&D1,$A$1:$A$1000&"",0))

why I cant make it to =INDEX(A:A,MATCH("*"&D1,A:A&"",0))?

You can. If the barcodes are in E and the 6-digit item to look for in D1...

Control+shift+enter, not just enter:

=VLOOKUP("*"&D1,$E$1:$E$100&"",1,0)

will return either the full barcode ending with the 6-digits of D1 or #N/A.

ok.

I mean that I use the formula on column E. then the data come in column E-barcode and column F-describtion
I don't want to use on E then use on F. two times uses. I want to use once.

many thanks

What do you mean by distribution and by using once?

=INDEX($F$1:$F$100,MATCH("*"&D1,$E$1:$E$100&"",0))

would return the F-value associated with the barcode which ends with the 6-digits of D1.
 
Upvote 0
You can. If the barcodes are in E and the 6-digit item to look for in D1...

Control+shift+enter, not just enter:

=VLOOKUP("*"&D1,$E$1:$E$100&"",1,0)

will return either the full barcode ending with the 6-digits of D1 or #N/A.



What do you mean by distribution and by using once?

=INDEX($F$1:$F$100,MATCH("*"&D1,$E$1:$E$100&"",0))

would return the F-value associated with the barcode which ends with the 6-digits of D1.
I mean when I use the vlookup on 6digit. I expect not only the 13digit return but also the description.

many thanks
 
Upvote 0
Like below...

Control+shift+enter, not just enter:

=VLOOKUP("*"&D1,$E$1:$E$100&"",1,0)&" "&INDEX($F$1:$F$100,MATCH("*"&D1,$E$1:$E$100&"",0))

not same cell. vlookup 6digit at E1, return the result at F1 then the description at G1. Is it possible?
and I doubt why the empty cell in E1 but the result still return at F1?

Many thanks
 
Upvote 0
not same cell. vlookup 6digit at E1, return the result at F1 then the description at G1. Is it possible?
and I doubt why the empty cell in E1 but the result still return at F1?

Many thanks

Which cell contains the 6 digits we want to look for?

Which range contain the barcodes?

Which range contain the corresponding descriptions?

In which cell do you want the result barcode?

In which cell do you want the corresponding description?
 
Upvote 0
not same cell. vlookup 6digit at E1, return the result at F1 then the description at G1. Is it possible?
and I doubt why the empty cell in E1 but the result still return at F1?

Many thanks
How about posting a few rows worth of sample data and tell us what result you expect.
 
Upvote 0

Forum statistics

Threads
1,215,105
Messages
6,123,118
Members
449,096
Latest member
provoking

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