Results 1 to 5 of 5

Thread: Split Data in one cell into below rows

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    VBAX Mentor
    Joined
    Jul 2012
    Posts
    398
    Location
    Sub transpose10()
        LR = Cells(Rows.Count, "A").End(xlUp).Row
        outrow = 2
        outcol = 5
        For j = 2 To LR
            s = Cells(j, 1).Value
            suc = Cells(j, 2).Value
            ar = Split(s, Chr(10))
            For i = 0 To UBound(ar)
                Cells(i + outrow, outcol) = ar(i)
                Cells(i + outrow, outcol + 1) = suc
            Next
            outrow = i + outrow
        Next
    End Sub
    Last edited by Aussiebear; 10-13-2024 at 04:35 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •