help matching & joining

joeloveszoe

Board Regular
Joined
Apr 24, 2014
Messages
110
Office Version
  1. 365
Platform
  1. MacOS
hi
i have a column of item numbers and another column of image names that include the item number

i am looking for an easy way to match the image to the item number

1 identify the main image in one cell (the main image name will contain '001'
2 combine the additional image names/location into a 2nd cell

the images are in a folder /Images/Shop-Vac/ - images names should be separate by ';'

any help to make this easy would be so greatly appreciated

thanks for helping!!!
 

Attachments

  • Screenshot 2024-09-23 at 10.29.14 AM.png
    Screenshot 2024-09-23 at 10.29.14 AM.png
    222.3 KB · Views: 7

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Try in C2:
Excel Formula:
=LET(a,FILTER("/Images/Shop-Vac/"&B:B,LEFT(B:B,8)=A2&"_"),b,SORT(HSTACK(RIGHT(a,7),a),,1),HSTACK(INDEX(b,1,2),TEXTJOIN(";",,DROP(b,1,1))))

so data is filtered to start with 7digit SKU and underscore (a)
then is stacked horizontally with just number and jpg and sorted on it (b)
and finally first elementy is placed in 1st cell and in second all but 1st are joined with semicolon as separator

Hope it does the job
 
Upvote 0
Try in C2:
Excel Formula:
=LET(a,FILTER("/Images/Shop-Vac/"&B:B,LEFT(B:B,8)=A2&"_"),b,SORT(HSTACK(RIGHT(a,7),a),,1),HSTACK(INDEX(b,1,2),TEXTJOIN(";",,DROP(b,1,1))))

so data is filtered to start with 7digit SKU and underscore (a)
then is stacked horizontally with just number and jpg and sorted on it (b)
and finally first elementy is placed in 1st cell and in second all but 1st are joined with semicolon as separator

Hope it does the job
amazing!!! and soooo helpful, thnak you
when i drag the formula down - i notice it missed some matching - possibly bc the image file names are not consistent
any thoughts how to grab these too - highlighter in orange as an example
 

Attachments

  • Screenshot 2024-09-23 at 11.13.06 AM.png
    Screenshot 2024-09-23 at 11.13.06 AM.png
    167.8 KB · Views: 1
Upvote 0
Indeed, the sample was not representative.

In the orange cells in column B there are (mostly) underscore missed between SKU and the rest of file name.
Possible modification could look at first seven characters and compare with SKU and on last 4 and compare with ".jpg"

Excel Formula:
=LET(a,FILTER("/Images/Shop-Vac/"&B:B,(LEFT(B:B,7)=A2)*(RIGHT(B:B,4)=".jpg")),b,SORT(HSTACK(RIGHT(a,7),a),,1),HSTACK(INDEX(b,1,2),TEXTJOIN(";",,DROP(b,1,1))))
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,179
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