Linking columns

romper

New Member
Joined
Jun 18, 2017
Messages
1
Hello,


I would like to match reference numbers with images names using vba code.


In one column "E" there are unique reference numbers, in column "F" are images names, in column "H" are url path to these images.


I would like to assign ref number to its corresponding images. Name of images includes names of ref numbers, for example:


ref. images:
fe 4211 fe-4211-3.jpg
fe-4211-e-3.jpg
fe-4211.jpg


I would like to link every single ref # with its images and separated output by coma within one cell. Of course there are much more
unique ref numbers and unordered list of images. I want to search images matching ref numbers


pattern of ref number are 2 letters plus 4 digits such as:
yy 3311
aa 3345
....


pattern of images files are
yy-3311-a.jpg
yy-3311-14.jpg
yy-3311-4.jpg
yy-3311.jpg
yy-3311-3-gimp.jpg
yy-3311-magen1-a.jpg
ct-4399-f.jpg
fo-5443-yy-8.jpg
fw-1305-3d.jpg
......
so part of first part of images name are the same : 2letter-4digit


Can you help me to write macro for this. I attached sample xlsx file.


Thank you,



http://i64.tinypic.com/eq15ie.jpg

http://i65.tinypic.com/d3yus.jpg


eq15ie.jpg







d3yus.jpg
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,243
Messages
6,170,964
Members
452,371
Latest member
Frana

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