ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   pasting to sheet without actually going to the sheet (https://www.excelbanter.com/excel-programming/346608-pasting-sheet-without-actually-going-sheet.html)

Mike

pasting to sheet without actually going to the sheet
 
I want to be on a sheet, select a range, and paste it to another sheet within
the workbook without actually going to the other sheet. I have used this in
the past for a single cell:

TargetSheet.Range("A1").Value = Sheets("Maintenance").Range ("A50").Value

I have TargetSheet defined and everything, but how do I do this for a range?
Thanks in advance.


Gary''s Student

pasting to sheet without actually going to the sheet
 
Sheets("Sheet1").Range("A1:J10").Copy Destination:= _
Sheets("Sheet2").Range("AB45")

--
Gary''s Student


"Mike" wrote:

I want to be on a sheet, select a range, and paste it to another sheet within
the workbook without actually going to the other sheet. I have used this in
the past for a single cell:

TargetSheet.Range("A1").Value = Sheets("Maintenance").Range ("A50").Value

I have TargetSheet defined and everything, but how do I do this for a range?
Thanks in advance.


Jim Rech

pasting to sheet without actually going to the sheet
 
You're not really "pasting" but "setting the value of one range to another".
To do that to multicell range is little different than what you posted:

TargetSheet.Range("A1:A2").Value = Sheets("Maintenance").Range
("A50:A51").Value

--
Jim
"Mike" wrote in message
...
I want to be on a sheet, select a range, and paste it to another sheet
within
the workbook without actually going to the other sheet. I have used this
in
the past for a single cell:

TargetSheet.Range("A1").Value = Sheets("Maintenance").Range ("A50").Value

I have TargetSheet defined and everything, but how do I do this for a
range?
Thanks in advance.




Mike

pasting to sheet without actually going to the sheet
 
Perfect! Thank you!

"Gary''s Student" wrote:

Sheets("Sheet1").Range("A1:J10").Copy Destination:= _
Sheets("Sheet2").Range("AB45")

--
Gary''s Student


"Mike" wrote:

I want to be on a sheet, select a range, and paste it to another sheet within
the workbook without actually going to the other sheet. I have used this in
the past for a single cell:

TargetSheet.Range("A1").Value = Sheets("Maintenance").Range ("A50").Value

I have TargetSheet defined and everything, but how do I do this for a range?
Thanks in advance.



All times are GMT +1. The time now is 05:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com