title: How to split cell contents from multiple columns into rows by delimeter?
body: <p>The code I have takes cells containing the delimiter (; ) from a column, and creates new rows (everything except the column is duplicated) to separate those values.</p>
  <p>What I have<br />
  <a href="https://i.stack.imgur.com/x1y2r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x1y2r.png" alt="enter image description here" /></a></p>
  <p>I need this for multiple columns in my data, but I don't want the data to overlap (ex: for 3 columns, I want there to be only one value per row in those 3 columns). It would be ideal if I could select multiple columns instead of only one as my code does now.</p>
  <p>What I want<br />
  <a href="https://i.stack.imgur.com/MpLqt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MpLqt.png" alt="enter image description here" /></a></p>
  <pre class="lang-vb prettyprint-override"><code>Sub splitByCol()
      Dim r As Range, i As Long, ar
      Set r = Worksheets(&quot;Sheet&quot;).Range(&quot;J2000&quot;).End(xlUp)
      Do While r.Row &gt; 1
          ar = Split(r.Value, &quot;; &quot;)
          If UBound(ar) &gt;= 0 Then r.Value = ar(0)
          For i = UBound(ar) To 1 Step -1
              r.EntireRow.Copy
              r.Offset(1).EntireRow.Insert
              r.Offset(1).Value = ar(i)
          Next
          Set r = r.Offset(-1)
      Loop
  End Sub
  </code></pre>