VBA code, insert code end of column

plshelpimpoor

New Member
Joined
Jul 14, 2019
Messages
4
HTML:
<a href="http://tinypic.com?ref=ega2xg" target="_blank"><img src="http://i64.tinypic.com/ega2xg.png" border="0" alt="Image and video hosting by TinyPic"></a>

Code:
Sub CopyToAnotherSheet2()'copy and transpose
Dim NextRow As Long
Dim cpRng As Range


Application.CutCopyMode = False
Application.ScreenUpdating = False


    Set cpRng = ActiveSheet.Range("c31:ab31")
    NextRow = Sheets("weekly").Cells(Rows.Count, 1).End(xlUp).Row + 1
    Sheets("Summary").Range("p4:p29").Copy
        Sheets("weekly").Cells(NextRow, 1).PasteSpecial Paste:=xlPasteValues, Transpose:=True


Application.CutCopyMode = True
Application.ScreenUpdating = True
End Sub

Above is the code. How do I get the code to run in column C (and below the previous week data) instead of at the very bottom?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Try changing the following lines as shown:
Code:
    NextRow = Sheets("weekly").Cells(Rows.Count - 1, 3).End(xlDown).Row + 1
    Sheets("Summary").Range("p4:p29").Copy
        Sheets("weekly").Cells(NextRow, 3).PasteSpecial Paste:=xlPasteValues, Transpose:=True
 
Upvote 0

Forum statistics

Threads
1,223,879
Messages
6,175,145
Members
452,615
Latest member
bogeys2birdies

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