Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() In your code you dont need the selects and stepping -9 won't do every row from 3288 up! try this: Sub copyPaste() Dim i As Long For i = 3288 To 3 Step -1 Range("Q" & i).Copy Destination:=Range("H" & i + 1) Next i End Sub Darius;318465 Wrote: copy content of Q3 and Paste it to H4 copy content of Q12 and Paste it to H13 .. .. .. copy content of Q3288 and Paste it to H3289 what my below program doing wrong for above job? Sub copyPaste() Dim j As Long For j = 3288 To 3 Step -9 R(j)C(17).select.copy R(j+1)C(7).select.paste Next j End Sub thanks for your help -- Simon Lloyd Regards, Simon Lloyd 'The Code Cage' (http://www.thecodecage.com) ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=89054 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Automating copy/paste/paste special when row references change | Excel Programming | |||
help w/ generic copy & paste/paste special routine | Excel Programming | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming |