stack columns into multiple columns

Urraco

Board Regular
Joined
Apr 19, 2021
Messages
69
Office Version
  1. 2016
Platform
  1. Windows
Hi everybody!

I have a huge list, over 600.000 rows
I would like to distribute the columns x1 and x2 in groups of 500 rows in order, exactly as in the example below ( in the example I put only 5 rows to simplify)
is it possible with a power query or formula?
Thank yery much!


Book1
ABCDEFGHIJKLMNOPQRST
1x1x2a1a2b1b2c1c2d1d2e1e2f1f2g1g2h1h2i1i2
2119821198261987111992161983211997262002312007362012412017
3219832198371988121993171982221998272003322008372013422018
4319843198481989131994181983231999282004332009382014432019
5419854198591990141995191982242000292005342010392015442020
65198651986101991151996201983252001302006352011402016452021
761987462022512027562032612037662042712047762052812057862062
871988472023522028572033622038672043722048772053822058872063
981989482024532029582034632039682044732049782054832059882064
1091990492025542030592035642040692045742050792055842060892065
11101991502026552031602036652041702046752051802056852061902066
12111992912067962072
13121993922068
14131994932069
15141995942070
16151996952071
17161997
18171998
19181999
20192000
21202001
22212002
23222003
24232004
25242005
26252006
27262007
28272008
29282009
30292010
31302011
32312012
33322013
34332014
35342015
36352016
37362017
38372018
39382019
40392020
41402021
42412022
43422023
44432024
45442025
46452026
47462027
48472028
49482029
50492030
51502031
52512032
53522033
54532034
55542035
56552036
57562037
58572038
59582039
60592040
61602041
62612042
63622043
64632044
65642045
66652046
67662047
68672048
69682049
70692050
71702051
72712052
73722053
74732054
75742055
76752056
77762057
78772058
79782059
80792060
81802061
82812062
83822063
84832064
85842065
86852066
87862067
88872068
89882069
90892070
91902071
92912072
93922073
94932074
95942075
96952076
97962077
98972078
99982079
100992080
1011002081
1021012082
1031022083
1041032084
1051042085
1061052086
1071062087
1081072088
1091082089
1101092090
1111102091
1121112092
1131122093
1141132094
1151142095
1161152096
1171162097
1181172098
1191182099
1201192100
1211202101
Sheet1
 
Thank you!
I get this error
Book3
ABCDEFG
21198211982#REF!#REF!#REF!
321983
431984
541985
651986
761987
871988
Sheet1
Cell Formulas
RangeFormula
C2:G2C2=INDEX( IF(ISODD(COLUMN(C2)), 1*($A$2:$A$600000),1*($B$2:$B$600000)), MOD((ROW(C2)-2),5)+1+ (INT((COLUMN(C2)-3)/2))*5+ INT((ROW(C2)-2)/5)*45,1)
What is is in Row1? I'm not sure if that makes a difference. But I do not see any REF errors in your formulas. Strange.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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