Private Sub Worksheet_Change(ByVal words As Range)
For Each C In Worksheets("Sheet1").Range("words").Cells
If Right(C.Value, 2) = "ar" Then
C.Value = Left(C.Value, (Len(C.Value) - 2)) + "áste"
ElseIf Right(C.Value, 2) = "er" Then
C.Value = Left(C.Value, (Len(C.Value) - 2)) + "íste"
ElseIf Right(C.Value, 2) = "ir" Then
C.Value = Left(C.Value, (Len(C.Value) - 2)) + "íste"
End If
Next
End Sub
Instructions:
In the worksheet select the range with all the text to be updated.
Name that range "words".
Select the worksheet's tab and rmb>view code.
Paste the above code into the window. Note: the name "Sheet1" in the code should be changed to match the name of the specific worksheet.
After that any change to a cell in the range "test" will trigger a check of the all the cells in the range "words" and make the replacements specified.