title: updating value of the Target cell in Excel VBA
body: <p>I am trying to update the value of the Target cell using VBA macro when it exists in particular Range.  I want to update its value as by concatenating a string to its value. For example if some writes 250 in the Target cell, I want to write back "XYZ-250" into the target cell.  Below is the code:</p>
  
  <pre><code>Dim oldCellAddress As String
  Dim oldCellValue As String
  Private Sub Worksheet_Change(ByVal Target As Range)
  oldCellValue = 0
  If Not Intersect(Target, Range("E10:E500")) Is Nothing Then
  oldCellValue = Target.Value
  Sheet1.Cells(Target.Row, Target.Column).Value = "AST-" &amp; oldCellValue
  End If
  End Sub
  </code></pre>
  
  <p>Interestingly when I change the value of any cell within the range (E10 to E500) the messagebox is displayed infinite times and halts the excel and I have to restart it again.</p>
  
  <p>Thanks in advance </p>