PDA

View Full Version : Search for data in different wrsht and paste result to other column in original wrsht



Lori2002
08-30-2019, 03:14 AM
Hi all,

I have very little experience with Excel VBA but was given the following task:

We have two worksheets, one with product numbers (and other irrelevant data) and one with file names. Now I need to match the product number to the file name (usually productnumber.jpg) and paste the file name in the column next to the product number. There are about 2 thousand of these so I need a way of doing this automatically. I have tried a few other solutions mentioned in threads here before, but nothing seems to work.
Attached I have an example of what the sheet looks like attached here.
Note: I am using Excel 2010 (but also have access to a laptop with Office 365)
Any help would be much appreciated, thank you in advance!

mana
08-30-2019, 04:36 AM
C2:=IFERROR(VLOOKUP("*"&B2&"*",Files!A:A,1,False),"")

Lori2002
08-30-2019, 05:33 AM
Thank you so much for your help, it works great!