Columns Sorting

M

maily

Hi, I do a guest list every week and I start with all the names in on
column and then I cut & copy into other columns so that they all fit o
one page without overflowing into the next page. Is there any way tha
I can just ask it to sort the one column into four columns to si
before the page break
 
P

Peter Atherton

Or you can use this. copy the macro into a VB Module (ALT
+ F11, Insert Module)

Sub sortNames()
Dim y As Long, h As Long
Dim rng As Range, dest As Range
nr = Application.CountA(Range("A:A"))
h = nr \ 4

For j = 4 To 2 Step -1
Set rng = Range(Cells(nr, 1), Cells(nr - h + 1, 1))
rng.Cut Destination:=Cells(2, j)
nr = nr - h
Next
End Sub

Close the VB module and return to your list. Choose Tools,
Macros and run the sort names procedure.

Regards
Peter
 
Top