Searching for a more efficient way of transposing my data from rows to one row

FroboLaggins

New Member
Joined
Jul 25, 2019
Messages
6
I have a tedious amount of these to do (200 files to be exact), some help would be massively appreciated:

Say I have 8 rows of numbers from column A to L, like so:

123456...
123456...
123456...

and so on, but I need to transpose them to this format:

123456...123456...123456...

all in row A

Is there an easier way to do this than individually copy and pasting each row?

Thanks in advance
 
Here is the google drive link: https://drive.google.com/drive/folders/13P5iMleUMLEOJuRYeb--MXQVa04nHraI

and I have attempted the solution in question 2 but I am completely inept at excel and am finding a lot of difficulty .
Code:
Sub Transpose()
'
    Range("A2:L2").Select
    Application.CutCopyMode = False
    Selection.Cut
    Range("M1").Select
    ActiveSheet.Paste
    Range("A3:L3").Select
    Selection.Cut
    Range("Y1").Select
    ActiveSheet.Paste
    Range("A4:L4").Select
    Selection.Cut
    Range("AK1").Select
    ActiveSheet.Paste
    Range("A4:L4").Select
    Application.CutCopyMode = False
    Selection.ClearContents
    Range("A5:L5").Select
    Selection.Cut
    Range("AW1").Select
    ActiveSheet.Paste
    Range("A6:L6").Select
    Selection.Cut
    Range("BI1").Select
    ActiveSheet.Paste
    Range("A7:L7").Select
    Selection.Cut
    Range("BU1").Select
    ActiveSheet.Paste
    Range("A8:L8").Select
    Selection.Cut
    ActiveWindow.SmallScroll ToRight:=1
    Range("CG1").Select
    ActiveSheet.Paste
End Sub

You can use this macro, and add a hot key to it something like crtl shift C
Save it into your personal macro workbook so you can use it in any sheet
 
Last edited:
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
or, if you are able, use PowerQuery aka Get&Transform

Column1Column2Column3Column4Column5Column6Column7Column8Column9Column10Column11Column12
7043​
6563​
6533​
7151​
7031​
7133​
6151​
6497​
6389​
6441​
6590​
6842​
6723​
6667​
6511​
7292​
6991​
7192​
5690​
6601​
6648​
6435​
6733​
6642​
6766​
6791​
6575​
7135​
7246​
7035​
6536​
6903​
6566​
6388​
6920​
6398​
6685​
6436​
6594​
6901​
7108​
6945​
6444​
6792​
6615​
6588​
6882​
6473​
6791​
6501​
6591​
6862​
7035​
7150​
6531​
6109​
6112​
6413​
6445​
6271​
6621​
6838​
6612​
6986​
6888​
7036​
6234​
6387​
6477​
6285​
6146​
6492​
6920​
6837​
6685​
6997​
7044​
7145​
6182​
6418​
6391​
6100​
6048​
13735​
6586​
6818​
6592​
6844​
6969​
6876​
6177​
6316​
6094​
6229​
8047​
6573​
Column1Column2Column3Column4Column5Column6Column7Column8Column9Column10Column11Column12Column13Column14Column15Column16Column17Column18Column19Column20Column21Column22Column23Column24Column25Column26Column27Column28Column29Column30Column31Column32Column33Column34Column35Column36Column37Column38Column39Column40Column41Column42Column43Column44Column45Column46Column47Column48Column49Column50Column51Column52Column53Column54Column55Column56Column57Column58Column59Column60Column61Column62Column63Column64Column65Column66Column67Column68Column69Column70Column71Column72Column73Column74Column75Column76Column77Column78Column79Column80Column81Column82Column83Column84Column85Column86Column87Column88Column89Column90Column91Column92Column93Column94Column95Column96
7043​
6723​
6766​
6685​
6791​
6621​
6920​
6586​
6563​
6667​
6791​
6436​
6501​
6838​
6837​
6818​
6533​
6511​
6575​
6594​
6591​
6612​
6685​
6592​
7151​
7292​
7135​
6901​
6862​
6986​
6997​
6844​
7031​
6991​
7246​
7108​
7035​
6888​
7044​
6969​
7133​
7192​
7035​
6945​
7150​
7036​
7145​
6876​
6151​
5690​
6536​
6444​
6531​
6234​
6182​
6177​
6497​
6601​
6903​
6792​
6109​
6387​
6418​
6316​
6389​
6648​
6566​
6615​
6112​
6477​
6391​
6094​
6441​
6435​
6388​
6588​
6413​
6285​
6100​
6229​
6590​
6733​
6920​
6882​
6445​
6146​
6048​
8047​
6842​
6642​
6398​
6473​
6271​
6492​
13735​
6573​

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    T2C = Table.ToColumns(Source),
    C2T = Table.FromList(T2C, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    Expand = Table.ExpandListColumn(C2T, "Column1"),
    Transpose = Table.Transpose(Expand)
in
    Transpose[/SIZE]

but it cannot be done in the same column/row as source data is
 
Last edited:
Upvote 0
but it cannot be done in the same column/row as source data is

I don't think he was really trying to transpose it, as much as just cut each row and place it all in row 1. Cause the order in his example file was 7043,6563,6533. etc... (order was all the same from left to right)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

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