Re-arranging a list into columns
Your naming tells me nothing and doesn't follow Standard VBA naming conventions.

Dim i - this is a counter? why not rowNumber
Dim n - this is also a counter? why not labelNumber
Dim x - is this a counter? why not nextRowNumber
Dim Library should be library
Dim LastRow should be lastRow


With library in fact Worksheets have a CodeName property - View Properties window (F4) and the (Name) field can be used as the worksheet name. This way you can avoid Sheets("mySheet") and instead just use mySheet.

A good way to speed up your macro is to use Application.Screenupdating = False and Application.Calculation = xlManual and Application.EnableEvents = False. Just be sure to return them to True and xlAutomatic and True before exiting the sub.



Additionally, you're doing everything on the sheet, which is slow by nature. Even just reading into an array should be quicker -

Option Explicit

Private Sub PrepareLibrary()
    Application.Screenupdating = False
    Dim lastRow As Long
    Dim results As Variant
    Dim resultsIndex As Long
    Dim currentRow As Long
    Dim currentColumn As Long
    currentColumn = 0
    lastRow = Library.Cells(Rows.Count, "A").End(xlUp).Row
    ReDim results(1 To lastRow)
    results = Library.Range("A1:A" &amp; lastRow).Value

    For resultsIndex = 1 To lastRow
        If IsNumeric(results(resultsIndex, 1)) Then
            currentColumn = currentColumn + 1
            Sheets("Sheet2").Cells(1, currentColumn) = results(resultsIndex, 1)
            currentRow = 2
        Else:
        Sheet2.Cells(currentRow, currentColumn) = results(resultsIndex, 1)
        currentRow = currentRow + 1
        End If
     Next
     Application.Screenupdating = True
End Sub


That's not a very good example of using the array to the maximum benefit, but it's something.