Another Quicki excel

  Paul-has-more-of-a-clue...:@) 00:13 02 Jan 2008
Locked

I have an alphabetical list of 1500, however it only takes up 1/2 a page. I want split the List into 2 coloms but so they are still in aphabetical order ie.

a
a
a
a
a
a
b
b
b
b
b
b

To

a a
a a
b b
b b


rather than having to copy & Paste at each page break

Cheers all

  VoG II 09:26 02 Jan 2008

Something like this perhaps:

Sub Resort()
Dim LastRow As Long, i As Long, j As Long
Dim ws1 As Worksheet, ws2 As Worksheet
Set ws1 = ActiveSheet
LastRow = ws1.Cells(Rows.Count, 1).End(xlUp).Row
Sheets.Add after:=Sheets(Sheets.Count)
Set ws2 = ActiveSheet
j = 0
For i = 1 To LastRow Step 2
j = j + 1
ws2.Cells(j, 1).Value = ws1.Cells(i, 1).Value
ws2.Cells(j, 2).Value = ws1.Cells(i + 1, 1).Value
Next i
End Sub


Press ALT+F11 to open the Visual Basic Editor, Insert > Module and paste in the code. Close the VBE. Select your sheet then Tools > Macro > Macros, highlight Resort and click the Run button.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Best phone camera 2017

Stunning new film posters by Hattie Stewart, Joe Cruz & more

iPad Pro 10.5in (2017) review

28 astuces pour profiter au mieux de votre iPhone