title: Splitting a value that is delimitted
body: <p>transactions sheet</p>
  
  <pre><code> ID1  Name Amount ID2 
   123   A     1   0;124;0 
   456   B     2   124;0;0  
   789   C     3   456;0;0
  </code></pre>
  
  <p>transactions sheet (Expected Result)</p>
  
  <pre><code> ID1  Name Amount ID2   Summary
   123   A     1   0;124;0  124
   456   B     2   124;0;0  456
   789   C     3   456;0;0
  </code></pre>
  
  <p>I have tried text to columns but I am unsure on how to ignore all the 0's and only display the value if its >0 in column D. I am new to vba so would appreciate some advice on this so I can learn.</p>
  
  <p>Code:</p>
  
  <pre><code>  Sub SplitRange()
    Dim cell As Range
    Dim str As Variant    'string array
    Dim r   As Integer
    For Each cel In ActiveSheet.UsedRange
     If InStr(cell.Value, ";") &gt; 0 Then 'split
     str = Split(cell.Value, ";")
     For r = LBound(str) To UBound(str)
     cel.Offset(r).Value = Trim(str(r))
     If r &lt; UBound(str) Then cell.Offset(r + 1).EntireRow.Insert
     Next r
     End If
    Next cell 
    End Sub
  </code></pre>