VBA to copy a range to another sheet

Kiwi den

Board Regular
Joined
Feb 17, 2014
Messages
143
Office Version
  1. 365
Platform
  1. Windows
Looking for VBA code
Start with deleting data in Sheet1 A1 - E1, so I can enter new data
Then I want to copy a range from sheet1 (A1 - E1) to sheet2 starting in A1 - E1,
then when data in sheet 1 changes, it copies to sheet2 in the next available row

Thanks in advance
 
I now have it so the info copies, but it pastes to column A only on sheet 2 A2 through to A20, rather than across rows A1 to S1
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
VBA Code:
Sub CpyPste()
    Sheets("Sheet1").Range("A1:S1").Copy Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
End Sub
 
Upvote 0
VBA Code:
Sub CpyPste()
    Sheets("Sheet1").Range("A1:S1").Copy Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
End Sub
Got it ,,, Thank you so much, I really appreciate it
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,509
Members
448,967
Latest member
screechyboy79

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