Copy/Paste(Transpose) from one sheet to another Marco loop

xHowiex

New Member
Joined
Jun 16, 2015
Messages
12
Hello All,

I am very new to macros (this being my first attempt) and I wish to copy data from one sheet (sheet 1) which is arranged in rows and paste it transposed to a specific column on a different sheet (sheet 2). I need to do this repeatedly for roughly 175 rows. I have a general idea of what I need to do but the coding is all new to me.

I need to copy cells D15:K15 from sheet 1, and then transpose them to sheet 2 column E starting in cell E2. This function needs to be repeated all the way through cells D177:K177 in sheet 1. In addition to this copy/transpose function, I also need to copy cells D2:K2 from sheet 1, and then transpose that to sheet 2 column C starting in C2.

I'm going to attach links to images that do a better job of explaining what I need to do. The colors are representative of what needs to be copied/transposed where.

bJmOmlf
Sheet 1 - Imgur

bs3So8D
Sheet 2 - Imgur

If this doesn't make any sense what-so-ever I understand. Any help will be useful though.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Do you want all the rows from Sheet1 copied to Sheet2, column E all underneath each other in one column? This would make for a very long column E.
 
Upvote 0
Yes, well most of the rows from sheet 1 to sheet 2. I am attempting to match up data collected from two different instruments.
 
Upvote 0
This macro will fulfill your original request:
Code:
Sub Copyranges()
    Application.ScreenUpdating = False
    Dim x As Long
    For x = 15 To 17
        Sheets("Sheet1").Range("D" & x & ":K" & x).Copy
        Sheets("Sheet2").Cells(Rows.Count, "E").End(xlUp).Offset(1, 0).PasteSpecial Transpose:=True
    Next x
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,560
Messages
6,120,217
Members
448,951
Latest member
jennlynn

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