title: VBA/EXCEL: extract numbers from one cell that contained multiple values with comma
body: <p><a href="http://i.stack.imgur.com/53tz0.jpg" rel="nofollow">http://i.stack.imgur.com/53tz0.jpg</a> is the images.</p>
  
  <p>Hello I would like to modify this code, so it understands multiple values. the best I came was the barcode scanner, I'm a novice in <code>vba</code> but I really enjoy it. this is a fun project that I do so please help me. Thanks guys.<P></p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
  
      Const SCAN_CELL As String = "A1"
      Const RANGE_BC As String = "A5:A500"
      Dim val, f As Range, rngCodes As Range
  
      If Target.Cells.Count &gt; 1 Then Exit Sub
      If Intersect(Target, Me.Range(SCAN_CELL)) Is Nothing Then Exit Sub
  
      val = Trim(Target.Value)
      If Len(val) = 0 Then Exit Sub
  
      Set rngCodes = Me.Range(RANGE_BC)
  
      Set f = rngCodes.Find(val, , xlValues, xlWhole)
      If Not f Is Nothing Then
          With f.Offset(0, 2)
              .Value = .Value + 1
          End With
      Else
          Set f = rngCodes.Cells(rngCodes.Cells.Count).End(xlUp).Offset(1, 0)
          f.Value = val
          f.Offset(0, 1).Value = "enter description"
          f.Offset(0, 2).Value = 1
      End If
  
      Application.EnableEvents = False
      Target.Value = ""
      Application.EnableEvents = True
  
      Target.Select
  End Sub
  </code></pre>