I have an Excel file with this data format.
Now I want to transform those data into column, like this.
How should I do that with Excel Formula or VBA scripts?
I have tried using Transpose paste but it overwrites the rows underneath.
Using Excel
Formulas it can be accomplished like as below:
• Formula used in cell A6
=HSTACK(TOCOL(IFS(B2:E4<>"",A2:A4),3),TOCOL(B2:E4,1))
Also I had prefer using POWER QUERY. To achieve this using the said procedure, follow this simple steps using POWER QUERY window UI
:
Table_1
let
Source = Excel.CurrentWorkbook(){[Name="Table_1"]}[Content],
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"SKU"}, "Attribute", "Value"),
#"Removed Columns" = Table.RemoveColumns(#"Unpivoted Other Columns",{"Attribute"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Value", "Images"}})
in
#"Renamed Columns"