Thread: Text to Rows
View Single Post
 
Old 05-27-2015, 05:49 AM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 32bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Give this a try
Code:
Sub NamesToRows()
    Dim lr As Long
    Dim i As Long
    Dim arr As Variant
    
With Sheets("Sheet1")
    lr = .Cells(Rows.Count, 1).End(xlUp).Row
    For i = lr To 1 Step -1
        With Cells(i, 1)
            arr = Split(.Value, Chr(10))
            If UBound(arr) > 0 Then
                .Offset(1, 0).EntireRow.Resize(UBound(arr)).Insert
                .Resize(UBound(arr) + 1) = Application.Transpose(arr)
            End If
        End With
    Next i
End With
End Sub
Reply With Quote