Traspose every 2nd row

BioPA

New Member
Joined
Oct 26, 2013
Messages
30
Hello!

Firstly, i d like to congratulate every single member who is contributing to this wonderful forum. Amazing job and useful replies which saving us from 1000's of working hours.

I have made a quick search on the forum for similar topics, but my knowledge in VBA is at a very embarrassing level :( in order to adjust the following for my spreadsheet.

http://www.mrexcel.com/forum/excel-questions/732604-macro-traspose-data.html
http://www.mrexcel.com/forum/excel-questions/729863-transposing-data-based-specific-condition.html
http://www.mrexcel.com/forum/excel-questions/727293-help-transpose-macro.html
http://www.mrexcel.com/forum/excel-...ow-every-5-rows-15-cells-into-one-column.html

My spreadsheet seems like that:

Col 1 Col2
Row 1 x1 y1
Row 2 x2 y2
Row 3 x3 y3
Row 4 x4 y4
Row N xn yn
Row N+1 xn+1 yn+1

I would like to transpose the cells every 2nd row to 2 new columns:

Col 1 Col 2 Col 3 Col 4
Row 1 x1 y1 x2 y2
Row 2 x3 y3 x4 y4
Row N xN yN xn+1 yn+1

All cells include numbers.

Any macro for that?

Regards,

P.S.I forgot to mention that i use Excel '10
 
Welcome to MrExcel.

Test the following macro on a backup.
Code:
Public Sub MoveData()
Application.ScreenUpdating = False
For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row Step 2
    Cells(i, 1).Resize(, 2).Cut Cells(i - 1, 3)
Next i
Range(Cells(1, 1), Cells(Rows.Count, 1).End(xlUp)).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Application.ScreenUpdating = True
End Sub
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top