Macro to convert rows to columns

Microsoft Excel 2007
February 16, 2010 at 06:33:44
Specs: Windows XP
I am trying to reformat my data from rows to columns.

Here is a sample of my data:
1976 29 571 1
1976 148 187 1
1976 156 3 1
1976 307 205 1
...

These are 4 separate columns. There are multiple entires for each year, from 1976 to 2006. However, the number of entries per year varies. I want my output to have one column per year, and then the rows to look something like:

29, 571
148, 187
156, 3
307, 205

Then within the table, I want the last number (in column 4). In this example, for each entry it would be 1.



See More: Macro to convert rows to columns

Report •


#1
February 16, 2010 at 06:46:52
Are you asking for our help or just telling us what you want?

Report •

#2
February 16, 2010 at 06:56:18
Sorry, I am asking for help-- I don't really know where to begin, so any advice or direction would be an enormous help. I just need some sort of starting point to go off of, which is what I was hoping to get help with, and then I can figure out the rest. I am dealing with a large dataset and I could probably manually do this but I wasn't sure if there was a command that I could use to help speed up the process. Thanks in advance for the direction, I am really not too much of an Excel whiz so any tips are really appreciated.

Report •

#3
February 16, 2010 at 06:58:58
Hi,

Create a new worksheet.

Back in the original worksheet select and copy all the data

In the new worksheet, right-click cell A1 and select PasteSpecial and check the transpose box
Click OK
and your data should now be arranged in columns instead of rows.

Regards


Report •

Related Solutions

#4
February 16, 2010 at 07:35:29
re: one column per year, and then the rows to look something like:
29, 571
148, 187
156, 3
307, 205

If you have one column for each year, are you asking that the rows below contain multiple numbers in each cell spearated by a comma?

If not, please explain how the "one column per year" part would work.


Report •


Ask Question