PDA

View Full Version : Convert Rows to Columns



Weezer
09-27-2010, 08:47 AM
Hello Everyone!

I want to write a Macro that converts the rows to columns & columns to Row values. I have dates as headers, I want to make them into row values, I'm having trouble doing this, is there a formatting function that can help me do this? Since I'm converting Row values to Column names, I want them to be dynamic. I know which row the values start from (44) & which row they end at (156). I want to get all the Rows between this range & convert them to column headings. I'm having a lot of trouble & I don't know how to go about this.

Can someone please help me out!Any help would be highly appreciated.

Thanks

austenr
09-27-2010, 09:20 AM
http://office.microsoft.com/en-au/excel-help/convert-columns-to-rows-or-rows-to-columns-HP005203138.aspx

Have a look at this

Weezer
09-27-2010, 10:04 AM
My spreadsheet is formatted, so when I do a paste special, the dialog box that pops up for me is quite different & there isn't a transpose option on that. This is the dialog box that pops up : (http ://www .msoffice-tutorial-training.com/images/excel-t19-pic4.gif)

Is there a way to just write a Macro for this ?

Thanks for all your help!

austenr
09-27-2010, 10:22 AM
can you post your workbook?

Weezer
09-27-2010, 11:57 AM
I can post my workbook later, but I progressed a bit in sorting the issue out. I just need help to paste the row values down so that there aren't any blank cells. An Example would be as follows:

Before: (The ' ' are blank spaces, it won't allow me to put a blank space)
Column 1 Column 2
Sunday Week 1
' ' Week 2
' ' Week 3
Monday Week 1
' ' Week 2
' ' Week 3

After: (What I'm Trying To Do)
Column 1 Column 2
Sunday Week 1
Sunday Week 2
Sunday Week 3
Monday Week 1
Monday Week 2
Monday Week 3

This is just an example of what I'm trying to do now. Is there a way I can do this with the help of VBA & make it dynamic, because I'm trying to do this for several files & hence that's why I need a Macro that allows me to do this. If possible, can I do a paste special for row values based on column heading names or do I need to do a GetHeader? Sorry if this sounds confusing, but right now I'm really confused hence the rambling.