Reformat Excel and move rows to a colum

September 9, 2011 at 09:39:37
Specs: Windows XP
Hello,
I have a workbook with one sheet in it. The excel is formatted as follows:

Smart_AB_Full CPW-POS0911231 3 for 2 on Selected Accessories/ Smartphone Cases
Single Header
Smart_A CPW-POS0911231 3 for 2 on Selected Accessories/ Smartphone Cases
Single Header
Smart_B CPW-POS0911231 3 for 2 on Selected Accessories/ Smartphone Cases


Ideally I would need the second row to become a column as following

Smart_AB_Full CPW-POS0911231 Single Header
Smart_A CPW-POS0911231 Single Header
Smart_B CPW-POS0911231 Single Header

The second row should be selected and moved against the first row as a column.

Does anyone have a Macro that would do this job?

THank you so much
Barbara


See More: Reformat Excel and move rows to a colum

Report •

#1
September 9, 2011 at 18:56:56
You don't need a macro, you can do it within Excel with just few steps:

Assuming you example data is in A1:A5, try this:

1 - In B1 enter =A2
2 - Select B1:B2
3 - Ctrl-c to Copy
4 - Select B3:B(the last Row of data in Column A)
5 - Ctrl-v to Paste
6 - Select Column A:B
7 - Data...Sort...on Column B
8 - Scroll half way down the data in Column A and delete all the cells that contain "single header".

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
September 15, 2011 at 01:32:41
Thank you so much, this seems to do the trick.
Are you aware of a way to automate this process?

Thank you again for your precious help.

Regards,
Barbara


Report •

#3
September 15, 2011 at 06:31:57
If I knew specifically what Rows and Columns the data was in, and if those locations were going to be consistant (mostly the Columns) I might be able to write a macro.

Please click on the blue line at the bottom of this post and read the instructions found via that link. Then post an example of your data using Column and Row headings.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •
Related Solutions


Ask Question