PC Review


Reply
Thread Tools Rate Thread

Copy/Paste Range

 
 
mastermind
Guest
Posts: n/a
 
      22nd Dec 2006
I have a range (E10:P95) and I would like to have excel copy it and
paste the values in a range of identical size (U10:AF95). Can someone
please tell me how to do this.

I have tried using these codes:

Range("E10:P95").Copy
Range("U10:AF95").Paste

Range("E10:P95").Select
Selection.Copy
Range("U10:AF95").Select
Selection.Paste

Neither one works for whatever reason, and cause my macro to skip
sections. Does anyone know how to solve this problem? Any help would
be appreciated. Thank you.

 
Reply With Quote
 
 
 
 
Gary Keramidas
Guest
Posts: n/a
 
      22nd Dec 2006
should be all you need, but qualify the range with the sheet names

Range("E10:P95").Copy Range("U10")

or
Worksheets("sheet1").Range("E10:P95").Copy Worksheets("sheet1").Range("U10")
--


Gary


"mastermind" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a range (E10:P95) and I would like to have excel copy it and
> paste the values in a range of identical size (U10:AF95). Can someone
> please tell me how to do this.
>
> I have tried using these codes:
>
> Range("E10:P95").Copy
> Range("U10:AF95").Paste
>
> Range("E10:P95").Select
> Selection.Copy
> Range("U10:AF95").Select
> Selection.Paste
>
> Neither one works for whatever reason, and cause my macro to skip
> sections. Does anyone know how to solve this problem? Any help would
> be appreciated. Thank you.
>



 
Reply With Quote
 
Bernard Liengme
Guest
Posts: n/a
 
      22nd Dec 2006
When you do a Copy & Paste (without VBA), you select only one cell before
the Paste operation.
I recorded a macro as I did a Copy&Paste; this is what I got
Sub Macro1()
'' Macro1 Macro
' Macro recorded 22/12/2006 by Bernard V Liengme
Range("B2:B5").Select
Selection.Copy
Range("J2").Select '<<<<<< Note only one
cell is selected
ActiveSheet.Paste
End Sub

best wishes and Merry Christmas
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"mastermind" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a range (E10:P95) and I would like to have excel copy it and
> paste the values in a range of identical size (U10:AF95). Can someone
> please tell me how to do this.
>
> I have tried using these codes:
>
> Range("E10:P95").Copy
> Range("U10:AF95").Paste
>
> Range("E10:P95").Select
> Selection.Copy
> Range("U10:AF95").Select
> Selection.Paste
>
> Neither one works for whatever reason, and cause my macro to skip
> sections. Does anyone know how to solve this problem? Any help would
> be appreciated. Thank you.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy & paste range nc Microsoft Excel Programming 4 20th Jul 2009 05:08 AM
Copy & paste range nc Microsoft Excel Misc 0 16th Jul 2009 06:58 PM
copy range and paste into every 3rd cell of new range thomsonpa Microsoft Excel New Users 4 3rd Dec 2007 01:47 PM
Input box Copy Paste Range =?Utf-8?B?SmF2eUQ=?= Microsoft Excel Programming 1 15th Nov 2005 10:48 PM
Copy paste range Marc Bell Microsoft Excel Programming 2 16th Feb 2004 01:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:12 AM.