Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Converting data into multiple rows
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Patrick Molloy, post: 6391206"] this sub checks the contents of column C and adds new rows for each item if theres a cell with more than one item comma separated Option Explicit Sub breakup() Dim cell As Range Dim rownum As Long Dim data As Variant Dim index As Long 'insert from bottom to top 'get the last row rownum = Range("C1").End(xlDown).Row For rownum = rownum To 2 Step -1 If InStr(Cells(rownum, "C").Value, ",") > 0 Then data = Split(Cells(rownum, "C"), ",") For index = 0 To UBound(data, 1) Rows(rownum + 1).Insert Cells(rownum + 1, "C") = data(index) Next Rows(rownum).Delete End If Next End Sub [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Converting data into multiple rows
Top