Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
move or copy sheets doesn't copy format | Excel Worksheet Functions | |||
Move or copy | Excel Discussion (Misc queries) | |||
Can I Move replace instead of Move copy | Excel Discussion (Misc queries) | |||
Move and Copy | New Users to Excel | |||
Move/Copy or Copy/Insert worksheet? | Excel Discussion (Misc queries) |