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

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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