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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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,214,920
Messages
6,122,267
Members
449,075
Latest member
staticfluids

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