title: How can I replace accents when there is a change in the workbook in VBA?
body: <p>I'm working on a macro.</p>
  <p>I need to automatically change the accents (if exists) when a value is inserted into a cell, for example change &quot;León&quot; to &quot;Leon&quot;. I'm trying to implement this in the <strong>Worksheet_Change</strong> function, but it doesn't work. Any idea how to do this?</p>
  <p>I'm trying to replace this words, if exists in the word inserted into the workbook</p>
  <pre><code>Private sub Worksheet_Change(ByVal Target As Range)
  
  On Error Resume Next
  
  rowEl = Target.Row
  colEl = Target.Column
  
  if(Left(Cells(rowEl, colEl).Formula,1)&lt;&gt; “=”)  Then Cells(rowEl, colEl) =UCase(Cells(rowEl, colEl))
  
  Dim int As Range, t As String
  Set intr = Intersect(rowEl, colEl)
  
  If intr Is Nothing Then Exit Sub
  
  For Each r in intr
      t= Replace((r.Text, “ó”),”o”,”)
      Next r
  End Sub
  </code></pre>
  <p>BR</p>