Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Cut&Paste Macro
I need a Cut and Paste macro which will cut every second row (A2,A4,
etc) and Paste them to a destination (E1,E3, etc) one by one. So A2 will be cut and pasted to E1, A4 to E3, etc etc. For the range A2 to A100. If you can add an option to delete rows 2, 4, 6 etc after the process it will also be appreciated. TIA JK |
#2
|
|||
|
|||
Wouldn't it be easier to delete the rows first and then copy
-- Don Guillett SalesAid Software wrote in message ... I need a Cut and Paste macro which will cut every second row (A2,A4, etc) and Paste them to a destination (E1,E3, etc) one by one. So A2 will be cut and pasted to E1, A4 to E3, etc etc. For the range A2 to A100. If you can add an option to delete rows 2, 4, 6 etc after the process it will also be appreciated. TIA JK |
#3
|
|||
|
|||
If you delete the row it's gone, how do you plan then to copy it?
On Fri, 8 Apr 2005 07:25:26 -0500, "Don Guillett" wrote: Wouldn't it be easier to delete the rows first and then copy |
#4
|
|||
|
|||
You can't really paste a whole row to column E. Are you looking to copy
columns A:D & paste them to column E ? " wrote: I need a Cut and Paste macro which will cut every second row (A2,A4, etc) and Paste them to a destination (E1,E3, etc) one by one. So A2 will be cut and pasted to E1, A4 to E3, etc etc. For the range A2 to A100. If you can add an option to delete rows 2, 4, 6 etc after the process it will also be appreciated. TIA JK |
#5
|
|||
|
|||
Sorry, actually only a Cell, for example: Cut Cell A2 and Paste to E1
then Cut Cell A4 and Paste to E3 etc etc. This should be done for 100 cells thus from A2 al the way to A100. One by one. On Fri, 8 Apr 2005 06:29:04 -0700, "Duke Carey" wrote: You can't really paste a whole row to column E. Are you looking to copy columns A:D & paste them to column E ? " wrote: I need a Cut and Paste macro which will cut every second row (A2,A4, etc) and Paste them to a destination (E1,E3, etc) one by one. So A2 will be cut and pasted to E1, A4 to E3, etc etc. For the range A2 to A100. If you can add an option to delete rows 2, 4, 6 etc after the process it will also be appreciated. TIA JK |
#6
|
|||
|
|||
Why can't you just copy that range of cells and paste them to E1? Are there
intervening cell entries? After moving them, do you want the cells cleared or the rows deleted Tough to divine just what you want done Here's code that will 'move' the cells Dim x As Integer, y As Integer y = 1 For x = 2 To 100 Step 2 Cells(x, 1).Copy (Cells(y, 5)) Cells(x, 1).Clear y = y + 2 Next x The line Cells(x, 1).Clear will wipe out the cells after they've been copied " wrote: Sorry, actually only a Cell, for example: Cut Cell A2 and Paste to E1 then Cut Cell A4 and Paste to E3 etc etc. This should be done for 100 cells thus from A2 al the way to A100. One by one. On Fri, 8 Apr 2005 06:29:04 -0700, "Duke Carey" wrote: You can't really paste a whole row to column E. Are you looking to copy columns A:D & paste them to column E ? " wrote: I need a Cut and Paste macro which will cut every second row (A2,A4, etc) and Paste them to a destination (E1,E3, etc) one by one. So A2 will be cut and pasted to E1, A4 to E3, etc etc. For the range A2 to A100. If you can add an option to delete rows 2, 4, 6 etc after the process it will also be appreciated. TIA JK |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro and sub rountines | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Date macro | Excel Discussion (Misc queries) | |||
Can't get simple macro to run | Excel Worksheet Functions | |||
Macro and If Statement | Excel Discussion (Misc queries) |