Insert multiple columns then copy data

Closed
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
I want a macro to insert varying number of columns then copy the corresponding data

original data:
ColumnA ColumnB ColumnC
Count
Row1 "5" x1 y1
Row2 "6" x2 y2
Row3 "3" x3 y3
Row4 "0" x4 y5
Row5 "1" x5 y6
.... ..... .... ....

Target output:

ColumnA ColumnB ColumnC
Count
Row1 "5" x1 y1
Row2 "5" x1 y1
Row3 "5" x1 y1
Row4 "5" x1 y1
Row5 "5" x1 y1

Row6 "6" x2 y2
Row7 "6" x2 y2
Row8 "6" x2 y2
Row9 "6" x2 y2
Row10 "6" x2 y2
Row11 "6" x2 y2

Row12 "3" x3 y3
Row13 "3" x3 y3
Row14 "3" x3 y3

Row15 "0" x4 y5

Row16 "1" x5
.... ..... .... ....



Thanks in advance.

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768