Transpose 3 rows to column

ricafonyat

New Member
Joined
May 1, 2017
Messages
29
Office Version
  1. 365
Platform
  1. Windows
My goal is to transpose in sequence three or more arrays arranged in rows, as shown in cell B11.

1718834436103.png




Any help it would be appreciated.
Best Regards
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I am still on Excel 2007 on this computer so I don't have some of the features of 365.
Many ways of doing it. This is just one possiblity with a macro.
Easy to adjust if needed. Starting point (Cells(5, 2) = B5) is the only hardcoded reference.
Code:
Sub One_Way()
Dim dataArr, ttl
Dim i As Long, j As Long, lr As Long, lc As Long
lr = Cells(Rows.Count, 2).End(xlUp).Row
lc = Range("XFD5").End(xlToLeft).Column
dataArr = Range(Cells(5, 2), Cells(lr, lc)).Value
    For i = LBound(dataArr) To UBound(dataArr)
        For j = LBound(dataArr, 2) To UBound(dataArr, 2)
            ttl = ttl & "|" & dataArr(i, j)
        Next j
    Next i
ttl = Split(Mid(ttl, 2), "|")
Cells(11, 2).Resize(UBound(ttl) + 1).Value = Application.Transpose(ttl)
End Sub
 
Upvote 0
An alternative with Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Columns",{"Attribute"})
in
    #"Removed Columns"
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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