formula help

factoryf

New Member
Joined
Apr 28, 2016
Messages
25
Hi Guys
i have some data i get with two basic columns part number and image link, i need to import these into my site with the first column being the part number and the image link, then the next image link

here is one image link ( i did this )
skupic
BM1TCBKhttps://www.catalograck.com/ImgVDHR/NFA/BM1TCBK.jpg
BM1TCBK-TXhttps://www.catalograck.com/ImgVDHR/NFA/BM1TCBK.jpg
BM1TCBLhttps://www.catalograck.com/ImgVDHR/NFA/BM1TCBL.jpg
BM1TCBL-TXhttps://www.catalograck.com/ImgVDHR/NFA/BM1TCBL.jpg
BM1TCRDhttps://www.catalograck.com/ImgVDHR/NFA/BM1TCR.jpg
BM1TCRD-TXhttps://www.catalograck.com/ImgVDHR/NFA/BM1TCR.jpg
BM1TSBKhttps://www.catalograck.com/ImgVDHR/NFA/BM1TSBK-1.jpg
BM1TSBLhttps://www.catalograck.com/ImgVDHR/NFA/BM1TSBL-1.jpg

<colgroup><col><col></colgroup><tbody>
</tbody>

here is how i get the data

D023LHhttps://www.catalograck.com/ImgVDHR/NFA/D023LH-1.jpg
D023LHhttps://www.catalograck.com/ImgVDHR/NFA/D023LH-2.jpg
D023LHhttps://www.catalograck.com/ImgVDHR/NFA/D023LH-4.jpg
D023LHhttps://www.catalograck.com/ImgVDHR/NFA/D023LH-5.jpg

<colgroup><col><col></colgroup><tbody>
</tbody>


here is how i need the data

part numberpic1pic2pic3pic4
D023LHhttps://www.catalograck.com/ImgVDHR/NFA/D023LH-1.jpghttps://www.catalograck.com/ImgVDHR/NFA/D023LH-2.jpghttps://www.catalograck.com/ImgVDHR/NFA/D023LH-4.jpghttps://www.catalograck.com/ImgVDHR/NFA/D023LH-5.jpg

<colgroup><col width="64" span="5" style="width:48pt"> </colgroup><tbody>
</tbody>


thanks in advance
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
with PowerQuery (Get&Transform)

SKUPicSKUPic.1Pic.2Pic.3Pic.4
D023LHhttps://www.catalograck.com/ImgVDHR/NFA/D023LH-1.jpgD023LHhttps://www.catalograck.com/ImgVDHR/NFA/D023LH-1.jpghttps://www.catalograck.com/ImgVDHR/NFA/D023LH-2.jpghttps://www.catalograck.com/ImgVDHR/NFA/D023LH-4.jpghttps://www.catalograck.com/ImgVDHR/NFA/D023LH-5.jpg
D023LHhttps://www.catalograck.com/ImgVDHR/NFA/D023LH-2.jpg
D023LHhttps://www.catalograck.com/ImgVDHR/NFA/D023LH-4.jpg
D023LHhttps://www.catalograck.com/ImgVDHR/NFA/D023LH-5.jpg

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Group = Table.Group(Source, {"SKU"}, {{"Count", each _, type table}}),
    List = Table.AddColumn(Group, "Pic", each Table.Column([Count],"Pic")),
    Extract = Table.TransformColumns(List, {"Pic", each Text.Combine(List.Transform(_, Text.From), ","), type text}),
    Split = Table.SplitColumn(Extract, "Pic", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"Pic.1", "Pic.2", "Pic.3", "Pic.4"})
in
    Split[/SIZE]
 
Upvote 0
Read first line in post#2

you'll need Excel 2010/2013 with PowerQuery add-in or higher version with PowerQuery (Get&Transform) build-in

What is PowerQuery

and no, this is not a macro :) this M-code for PowerQuery (Get&Transform)
 
Last edited:
Upvote 0
ok got all that and i have the latest version so that's all set, and i have been using this just to this extent. it kicks me an error "can't find table1" also i only have two columns one is sku and one is pic there could 1 pic per sku or 10 will this still work?
 
Upvote 0
in post#2 blue table is a Excel Table (Ctrl+T)
check the name of your new table and use it in the code

Source = Excel.CurrentWorkbook(){[Name="[B][COLOR="#FF0000"]Table1[/COLOR][/B]"]}[Content],

for something more post representative source example and expected result
 
Upvote 0

Forum statistics

Threads
1,214,426
Messages
6,119,417
Members
448,895
Latest member
omarahmed1

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