VBA - Copy Data Range into Table

hierosir

New Member
Joined
Jun 17, 2015
Messages
4
Hi all!

Hopefully a quick question. I have a macro that with a click copies a data range from one worksheet into another, just bellow the last entry and transposes it. However I now need to change this macro. The cell references and everything remain the same, but it now needs to paste into a Table ("Table1"). At the moment, the macro I have simply pastes it immediately outside of the Table's range.

Here's the existing code:

Code:
Sub Plan()
    Sheets("Step2").Select
    Range("e4:e30").Select
    Selection.Copy
    Sheets("Table").Select
    Range("a65536").End(xlUp)(2).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=True
    Sheets("Step2").Select
    MsgBox "Your entries are saved to a Table", , "Record saved"
    Range("E5:E8,E10:E15,E17:E28,E30").Select
    Selection.FormulaR1C1 = ""
    Application.CutCopyMode = False
    [e5].Select
   
    Sheets("Quarters").Select
    Range("c3,c6,c8").Select
    Selection.FormulaR1C1 = ""
    Application.CutCopyMode = False
    [c4].Select


    Sheets("Month").Select
    Range("c3,c6,c8").Select
    Selection.FormulaR1C1 = ""
    Application.CutCopyMode = False
    [c4].Select


    Sheets("Step2").Select
    [e5].Select
    
    Call Mail_small_Text_Outlook
    
End Sub
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,223,958
Messages
6,175,633
Members
452,661
Latest member
Nonhle

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