VJ1234
12-18-2009, 08:15 AM
Hi,
I have a row of data in Excel. The number of columns may vary on a case by case basis. I wish to transform the data from 1 row to 1 column (Like the first row has to be the first column). I tried recording a macro using the transpose option under paste special. Found 2 reasons which limit this approach.
1) Paste special is not working if I cut the data. It works only if I do a copy.
2) Less flexible in handling the variations in the number of columns.
Is there any other way of achieving this by an excel macro or VBA? Thanks in advance for your help!
I have a row of data in Excel. The number of columns may vary on a case by case basis. I wish to transform the data from 1 row to 1 column (Like the first row has to be the first column). I tried recording a macro using the transpose option under paste special. Found 2 reasons which limit this approach.
1) Paste special is not working if I cut the data. It works only if I do a copy.
2) Less flexible in handling the variations in the number of columns.
Is there any other way of achieving this by an excel macro or VBA? Thanks in advance for your help!