#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default paste

I wish to copy a line and paste it into anotherline

Sub macro1()
Range("A2:L2").Select
ActiveSheet.Copy
Range("A23:L23").Select
ActiveSheet.Paste
end sub
This doesn't work
Can anyone help me on this
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default paste


Range("A1:L1").Select
Selection.Copy
Range("A3:L3").Select
ActiveSheet.Paste

works perfectly if you are copying range

for copiing whole line use

Rows("1:1").Select
Application.CutCopyMode = False
Selection.Copy
Rows("3:3").Select
ActiveSheet.Paste

*** Sent via Developersdex http://www.developersdex.com ***
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default paste


"Aram Sargsyan" wrote in message
...

Range("A1:L1").Select
Selection.Copy
Range("A3:L3").Select
ActiveSheet.Paste


No selecting

Range("A1:L1").Copy Range("A3")

for copiing whole line use

Rows("1:1").Select
Application.CutCopyMode = False
Selection.Copy
Rows("3:3").Select
ActiveSheet.Paste



Ditto

range("1:1").Copy Range("A3")


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default paste

Thank you very much. This was exactly wath I wanted to know.

"Aram Sargsyan" wrote:


Range("A1:L1").Select
Selection.Copy
Range("A3:L3").Select
ActiveSheet.Paste

works perfectly if you are copying range

for copiing whole line use

Rows("1:1").Select
Application.CutCopyMode = False
Selection.Copy
Rows("3:3").Select
ActiveSheet.Paste

*** Sent via Developersdex http://www.developersdex.com ***

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default paste


jobra Wrote:
I wish to copy a line and paste it into anotherline

Sub macro1()
Range("A2:L2").Select
ActiveSheet.Copy
Range("A23:L23").Select
ActiveSheet.Paste
end sub
This doesn't work
Can anyone help me on this
Thanks


Hi jobra

Try this

Range("A2:L2").Select
Selection.Copy
Range("A23").Select
ActiveSheet.Paste
Range("A1").Select


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=397699



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
Paste and Paste Special No Longer Working - Excel 2003 SheriJ Excel Discussion (Misc queries) 2 January 15th 09 09:23 PM
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. stan-the-man Excel Worksheet Functions 7 June 14th 06 08:10 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
Copy and Paste macro needs to paste to a changing cell reference loulou Excel Programming 0 February 24th 05 10:29 AM
Macro to Paste to specific line, and continue to Paste each time on next row not over tomkarakowski[_2_] Excel Programming 1 May 28th 04 06:50 PM


All times are GMT +1. The time now is 12:26 PM.

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"