reformat (transpose) macro

jenshay

Board Regular
Joined
Nov 18, 2003
Messages
71
I would like to transpose multiple cell ranges in a vertical format. J3:J10 on Sheet 1 to Sheet 2, C3:J3; M3:M10 on Sheet 1 to Sheet 2, K3:R3; and N3:N10 on Sheet 1 to Sheet 2, S3:Z3.

Skip 2 rows 11 and 12 (no data or data not wanted) on Sheet 1.

Then repeat with next block of data, range J13:J20 on Sheet 1 to Sheet 2, C4:J4 (next row down); M13:M20 on Sheet 1 to Sheet 2, K4:R4; and N13:N20 on Sheet 1 to Sheet 2, S4:Z4.

Skip 2 rows 14 and 15 on Sheet 1.

Repeat indefinitely or at least for a few hundred rows.

Is there a quick macro that can help me do this without having to cut and transpose each set of data?

Thanks!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Does this get you started?

Code:
Sub AHint()
Sheets("Sheet1").Range("J3:J10").Copy
Sheets("Sheet2").Range("C3").PasteSpecial Paste:=xlPasteValues, Transpose:=True
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

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