#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 159
Default Copy and move

I am trying to copy and move 2 rows and paste. It keeps pasting 2 rows from
place i created the macro, not 2 rows from where I run the macro. I want new
paste to be 2 rows from run position
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Copy and move

Hi,

Show us your code.

Generally, one replace absolute references in vba with the
ActiveCell.Offset(2,0).PasteSpecial

or something similar depending on your code.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Larry" wrote:

I am trying to copy and move 2 rows and paste. It keeps pasting 2 rows from
place i created the macro, not 2 rows from where I run the macro. I want new
paste to be 2 rows from run position

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Copy and move

Select a cell and run:

Sub rose()
Dim n As Long
n = ActiveCell.Row
Rows(n & ":" & n + 1).Copy Range("A" & n + 2)
End Sub

Two rows will be copied two rows down. If you put the active cell anywhere
in row 7 and run the macro, then rows 7 & 8 will be copied down to rows 9 &
10.
--
Gary''s Student - gsnu200840


"Larry" wrote:

I am trying to copy and move 2 rows and paste. It keeps pasting 2 rows from
place i created the macro, not 2 rows from where I run the macro. I want new
paste to be 2 rows from run position

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
move or copy sheets doesn't copy format ColinX Excel Worksheet Functions 1 May 14th 08 10:07 PM
Move or copy Richard Excel Discussion (Misc queries) 2 March 12th 08 01:36 AM
Can I Move replace instead of Move copy [email protected] Excel Discussion (Misc queries) 2 January 9th 08 10:25 PM
Move and Copy [email protected] New Users to Excel 2 November 12th 07 11:42 AM
Move/Copy or Copy/Insert worksheet? kjk Excel Discussion (Misc queries) 0 December 15th 06 02:40 PM


All times are GMT +1. The time now is 07:51 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"