Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pasting into a filtered sheet Victor Delta[_2_] Excel Discussion (Misc queries) 3 November 25th 09 08:19 PM
Pasting Into new sheet Todd Nelson Excel Discussion (Misc queries) 0 August 6th 05 01:17 AM
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B Hannes Heckner Excel Programming 1 March 5th 04 09:10 AM
Problem pasting a row from a hidden sheet to the first free row on another visible sheet Didier Poskin Excel Programming 2 January 10th 04 01:18 AM
Pasting to Sheet Nigel[_7_] Excel Programming 2 November 14th 03 06:03 PM


All times are GMT +1. The time now is 02:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"