Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to do a copy and paste. However, I need the paste to paste
in a different row so they don't overlay. I have been trying to do for loops so the the loop would cause the row number to change (i.e. A3 A4 A5). But no success. Please help. this is the base of my script so far Sub PasteSpecial() Dim DeleteRows As Range Range("A1:A3").Copy Range("C4").Select ' This is the problem Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True Set DeleteRows = Range("A1:A8") ' this deletes the row that I just copied. i.e. cut DeleteRows.Delete Shift:=xlShiftUp End Sub This works great but it will overlap, paste over paste, becuase I have the second range set to C4. I want some how for the C4 to change after every copy so it would be like this... Range("A1:A3").Copy Range("C4").Select ' This is the problem Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True Range("A1:A3").Copy Range("C5").Select ' This is the problem Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True Range("A1:A3").Copy Range("C6").Select ' This is the problem Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Using Do Loops to copy data | 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 |