Continued Conversion of data from rows to columns in a macro.

K

Karaman

I created a macro to convert data from rows to columns, but I need the
command to insert in the Do Loop in order to repeat the same process for the
next row(s). The data is available in each row where the first four cells
are a title followed by 48 cells with data in each 4 cells for a month. The
mothly data needs to be converted to column form. This was done easily in a
macro, but how do I repeat the same process fore the next row(s)?
 
J

Jim Thomlinson

This might be a silly question but why not use

PasteSpecial -> Transpose ???

This should save you a lot of grief.
 
K

Karaman

Jim,
Thank you for the reply. I am familiar with what you recommended, however
the transpose function places the data in one column while I wish to preserve
the data order. I already have the macro to place the data in the proper
order and position for the first row. The only piece that is missing is how
to switch and repeat the same copy and paste process for the next row of data
with over 1000 rows of data. I hope you can help.
 
J

Jim Thomlinson

Post your code and lets have a look at it. Hard to give you a good response
without seeng the code...
 
J

Jim Thomlinson

Also I do not follow you on the order thing. What part of this is wrong

Original
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
Transposed
1 1 1 1 1 1
2 2 2 2 2 2
3 3 3 3 3 3
4 4 4 4 4 4

???
 
K

Karaman

Hi Jim,

Here is what the data looks like:
Text1 Text1 Text1 Text1 1 2 3 4 5 6 7 8 9 10 11 12
Text2 Text2 Text2 Text2 1 2 3 4 5 6 7 8 9 10 11 12
Text3 ......

I'm trying to convert the above to look like this:
Text1 Text1 Text1 Text1 1 2 3 4
5 6 7 8
9 10 11 12
Text2 Text2 Text2 Text2 1 2 3 4
5 6 7 8
9 10 11 12
I wrote the macro to arrange the Text1 data, but how can I continue reading
and arranging the next rows within the macro as what was done to the first
one? I assume it's a Do Loop, but just need the code to force it to read
Row2 and repeat the same process. Thanks and I hope that you can help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top