Vlookup

Cloud67

New Member
Joined
Mar 13, 2019
Messages
20
Hi,

I am trying to execute following code, this code matches first 10 characters of two columns and if it matches then it copy and paste it in the workbook.

/code

.Formula = "=VLookup(LEFT(A2,5),'C:\Users\ofatima\Documents\Ivy Woo\[dump_parts_IWoo New.9175.xls]Sheet1'!$A:

/code

it is working with this code but it is returning only five char in the column and when i try the wildcard it is giving me the mismatch error,.

/code
.Formula = "=VLookup(LEFT(A2,5)& " * " ,'C:\Users\ofatima\Documents\Ivy Woo\[dump_parts_IWoo New.9175.xls]Sheet1'!$A:$AK,{1},False)"

code/

Will appreciate the help
Thanks
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Code:
[COLOR=#333333].Formula = "=VLookup(LEFT(A2,5),'C:\Users\ofatima\Documents\Ivy Woo\[dump_parts_IWoo New.9175.xls]Sheet1'!$A:[/COLOR]

This portion of the code determines how many characters to copy : LEFT(A2,5)
The 5 means 5 characters. What happens when you change that to 10 ?
 
Upvote 0
Try:

.Formula = "=VLookup(LEFT(A2,5)&""*"",'C:\Users\ofatima\Documents\Ivy Woo\[dump_parts_IWoo New.9175.xls]Sheet1'!$A:$AK,1,False)"
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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