Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Copy/Paste Range

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Copy/Paste Range

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" wrote in message
ps.com...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default Copy/Paste Range

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" wrote in message
ps.com...
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
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
Copy & paste range nc Excel Discussion (Misc queries) 0 July 16th 09 06:58 PM
copy range and paste into every 3rd cell of new range thomsonpa New Users to Excel 4 December 3rd 07 01:47 PM
copy and paste values in a range Dave Peterson Excel Programming 4 December 14th 06 10:17 PM
Copy paste range Marc Bell Excel Programming 2 February 16th 04 01:21 PM
copy / paste values for certain range Eric Dreshfield Excel Programming 2 September 10th 03 04:04 PM


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

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

About Us

"It's about Microsoft Excel"