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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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