Sorting

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

I have a worksheet which is made up of three columns, I was wondering is
there a way to have a macro sort them into groups of 50 and have them go
into orders of

1 - 50 into columns a - c
51 - 100 columns e-g
101 - 150 columns i - k

I need it to count the rows and sort into how many pages necessary.

It is a dynamic worksheet but the most rows it will have is 1100


Is this possible?

Thanks in advance
Greg
 
See if this works. If satisfied then simply delete columns a,b,c with the
last line.

Sub arrangeem()
For i = 1 To Cells(Rows.Count, "a").End(xlUp).Row Step 50
lc = Cells(1, "iv").End(xlToLeft).Column + 1
Cells(i, 1).Resize(50, 3).Copy Cells(1, lc)
Next i
'Columns("a:c").Delete
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