Question : Microsoft Excel 2007 - parse Data in a cell

Hi Experts
I have a huge text file that is filled with individual cells that contain lists. What I am trying to do is parse the data so that each line in the list appears in its own cell... this textfile contains lots of cells with lots of lists.. Is there a way to do this? I am attaching one of the cells... thanks
Attachments:
 
 

Answer : Microsoft Excel 2007 - parse Data in a cell

Slightly different approach...
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
Sub SplitCells()
    
    Dim LastR As Long
    Dim DestR As Long
    Dim arr As Variant
    Dim Counter As Long
    Dim Counter2 As Long
    
    LastR = Cells(Rows.Count, 1).End(xlUp).Row
    
    For Counter = 1 To LastR
        If Cells(Counter, 1) <> "" Then
            arr = Split(Cells(Counter, 1), Chr(10))
            For Counter2 = 0 To UBound(arr)
                DestR = DestR + 1
                Cells(DestR, 2) = arr(Counter2)
            Next
        End If
    Next
    
    MsgBox "Done"
    
End Sub
Random Solutions  
 
programming4us programming4us