#1   Report Post  
 
Posts: n/a
Default 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
  #3   Report Post  
 
Posts: n/a
Default

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   Report Post  
Duke Carey
 
Posts: n/a
Default

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   Report Post  
 
Posts: n/a
Default

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   Report Post  
Duke Carey
 
Posts: n/a
Default

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
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
Macro and sub rountines The Good Deeds Team Excel Discussion (Misc queries) 1 March 23rd 05 11:26 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Can't get simple macro to run Abi Excel Worksheet Functions 5 January 12th 05 07:37 PM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM


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