title: Split strings in excel (vba)
body: <p>I am currently using this code(from a fellow user here) to find every cell in column b1 and to find the ones that contain a ";" something like "hello;goodbye". The code will split the cell at the ";" and place "goodbye" directly beneath "hello;" on an entirely new row..</p>
  
  <p>What I need now is this... if a cell contains <strong><em>multiple</em></strong> ";" (ie "hello;goodbye;yo;hi;hey") it will split at EACH ";" not just the first and then move each to a new row directly beneath the other...</p>
  
  <p>What changes do I need to make?</p>
  
  <pre><code>Dim r1 As Range, r2 As Range
  Dim saItem() As String
  
  
  For Each r1 In ActiveSheet.Range("B1", Cells(Application.Rows.Count, 2).End(xlUp))
  If InStr(1, r1.Value2, ";") &gt; 0 Then
  saItem = Split(r1.Value2, ";")
  r1 = Trim$(saItem(0)) &amp; ";"
  r1.Offset(1).EntireRow.Insert (xlDown)
  r1.Offset(1) = Trim$(saItem(1))
  End If
  Next r1
  </code></pre>