Formating multiple columns

A

Atochabsh

I have a data sheet with nearly 9000 "rows" of data. Those rows have
columns of data. The first column is last names. I need to keep th
data in alphabetical order. But since we print this data in book form
I'd like to save paper by creating two columns of this data on one piec
of paper. So far there are 52 rows per page. How can I transfer thi
data into two sets of data per page? keeping it in alphabetical order.
In the past we have copy and pasted, but it takes a very long time to d
that with this much data.

Thank you,

Atochabs
 
G

Gord Dibben

Not sure how you want the pages to be laid out but have a try with
this code which puts 1-52 and 53-104 side by side on one page.

Sort your original first on last names then run the macro.

Sub Move_Sets_PBreak()
'pbreak inserted
Dim iSource As Long
Dim iTarget As Long
Dim i As Long

iSource = 1
iTarget = 1
Application.ScreenUpdating = False
Do
Cells(iSource, "A").Resize(52, 7).Cut _
Destination:=Cells(iTarget, "A")
Cells(iSource + 52, "A").Resize(52, 7).Cut _
Destination:=Cells(iTarget, "H")

iSource = iSource + 104
iTarget = iTarget + 52

Loop Until IsEmpty(Cells(iSource, "A"))

For i = 53 To Cells(Rows.Count, "A").End(xlUp).Row Step 52
Cells(i, 1).Select
ActiveSheet.HPageBreaks.Add Before:=ActiveCell
Next i
Application.ScreenUpdating = True
End Sub


Gord
 

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