Copy range to new sheet

KGee

Well-known Member
Joined
Nov 26, 2008
Messages
537
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a couple of ranges in one sheet that I want to copy to a new sheet using VBA. So I have range1, range2 and range3 which I want to copy to columns A, B, C in the new sheet. I can do this:

select source sheet
select range
copy range
select destination sheet
select cell A1
paste


But how do I accomplish the same thing in one line without selecting the sheets?

Sheets("Sheet1").Range.Copy .Sheets("Sheet2").Range("A1")
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
It looks like you have it already solved...

Sheets("Sheet1").Range("A1").Copy Sheets("Sheet2").Range("A1")

That will copy A1 from Sheet1 TO Sheet2
 
Upvote 0
I should have mentioned that I define the three ranges in the source sheet and the number of cells being copied varies for each. So I'm not sure how to handle copying the range of cells to the clipboard and pasting each into cells A1, B1 and C1 in the destination sheet.
 
Upvote 0

Forum statistics

Threads
1,214,872
Messages
6,122,025
Members
449,060
Latest member
LinusJE

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