To copy range of items to the the row below

  • Thread starter Thread starter Jentan
  • Start date Start date
J

Jentan

Need some assistance on the copy of range. I only a simple range
command; i.e, range("A1:F1").copy range("A2"). This will only copy item
in row 1 to row 2.


A B C D E F
1 06-Apr-06 487153 576.54 GUNASAI RPL CHQ
2
3 06-Apr-06 487162 2,000.00 GOH MUI JOO LOST CHQ
4
5 06-Apr-06 487169 2,699.06 LEE TOOK YONG PN:7511090
6
7 06-Apr-06 487176 1,024.86 WOO BOON LENG NET PAY cyc 08
8

Question:
May I know how to copy row 1 to row 2, row 3 to row 4, row 5 to 6 and
row 7 to 8 using a single macro? Thank you.
 
try

Sub copyeveryother()
For i = 1 To Cells(Rows.Count, "a").End(xlUp).Row Step 2
Rows(i).Copy Rows(i + 1)
Next i
End Sub
 

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

Back
Top