Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-27-2015, 05:49 AM
NoSparks NoSparks is offline Text to Rows Windows 7 64bit Text to Rows 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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Text to Rows Delete blank rows between the two rows that contain data beginner Excel Programming 5 12-26-2014 12:29 AM
Text to Rows Delete All empty Rows - Print - Undo all Rows deleted Bathroth Word VBA 1 10-01-2014 01:40 PM
Text to Rows Grouping table rows to prevent individual rows from breaking across pages dennist77 Word 1 10-29-2013 11:39 PM
Text to Rows Delete Blank Rows (Cyrillic Text in Spreadsheet ) dozd Excel 1 02-22-2013 03:24 AM
Text to Rows Count rows and add blank rows accordingly Hoochtheseal Word VBA 1 01-29-2013 09:23 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft