Cut&Paste Macro

S

someone

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
 
G

Guest

You can't really paste a whole row to column E. Are you looking to copy
columns A:D & paste them to column E ?
 
S

someone

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top