Results 1 to 10 of 35

Thread: Redistribute a Delimited Column Of Data into Separate Rows (Keeping Other Data As Is)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    14
    I hope it's obvious that:
    - this macro resides in the macromodule it refers to
    - the ranges (A1:A6, B1:B6, etc.) have to be adapted to your specific situation
    - the delimiter in column C is ", " and may have to be adapted to your specific situation

    Code:
    Sub M_snb()
        sn = Split(Join([transpose(A2:A6 & "_" & B2:B6 & "_" & substitute(C2:C6,", ","," & A2:A6 & "_" & B2:B6 & "_"))], ","), ",")
        Cells(20, 1).Resize(UBound(sn) + 1) = Application.Transpose(sn)
        Cells(20, 1).CurrentRegion.TextToColumns , , , , False, False, False, False, True, "_"
    End Sub
    Your feedback is too limited to analyse what could have caused the error.
    Posting a sample workbook could shed some more light.
    Last edited by snb; 06-27-2014 at 01:45 PM.

Similar Threads

  1. Move data from rows into columns for every unique value
    By mahmoud-lee in forum Excel Help
    Replies: 4
    Last Post: 06-13-2013, 03:02 AM
  2. Replies: 4
    Last Post: 05-01-2013, 09:49 PM
  3. Replies: 3
    Last Post: 03-16-2013, 05:13 PM
  4. Replies: 12
    Last Post: 08-19-2012, 06:17 PM
  5. Transpose data into Rows
    By vikash200418 in forum Excel Help
    Replies: 2
    Last Post: 04-10-2012, 11:02 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
  •