Counting entries and copying

G

Guest

I have a number of entries in Col A & B
The number varies, could be 100 and it could increase
I would like to have a macro that would copy these entries as follows:
Lets assume that I have 100 entries in A & B-Starting at A1 & B1
I want to leave the first 25 where they are
Then take entries 25 to 50 and COPY them to col d & E(starting at D1 & E1)
Then take the next quarter (51 to 75) and COPY them to col G & H
Then copy the last quarter to Col J & K
Thanks for the help
 
G

Guest

Sub pcor()
Set r1 = Range("A25:B50")
Set r2 = Range("A51:B75")
Set r3 = Range("A76:B100")
Set r1d = Range("D1")
Set r2d = Range("G1")
Set r3d = Range("J1")
r1.Copy r1d
r2.Copy r2d
r3.Copy r3d
End Sub
 
G

Guest

That would only work if col a & B contained exactly 100 entries. As I said
before the number of entries in Col A & A will vary from 80 to 200 on a
regular basis
But thanks for the help. much appreciated
 

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