Hello.

I want from each cell in range A:A, to check the last letter, and if it is an "a" letter to substitute with letter "e" and to enter it in Cell (B & i)

here is the working code for all other letter except this letter "a" at the end

Thanks!

I want from each cell in range A:A, to check the last letter, and if it is an "a" letter to substitute with letter "e" and to enter it in Cell (B & i)

here is the working code for all other letter except this letter "a" at the end

Code:

```
Sub stov()
Dim LR As Long, i As Long
Application.ScreenUpdating = False
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
With Range("A" & i)
If Right(.Value, 1) = "o" Then Cells(i, 2).Value = Left(.Value, Len(.Value) - 1) & "a" 'genitiv od koga?od cega?
If Right(.Value, 1) = "a" Then Cells(i, 2).Value = Left(.Value, Len(.Value)-1) & "e"
' If Right(.Value, 1) = "n" Then Cells(i, 2).Value = Left(.Value, Len(.Value)) & "a"
' If Right(.Value, 1) = "v" Then Cells(i, 2).Value = Left(.Value, Len(.Value)) & "a"
' If Right(.Value, 1) = "e" Then Cells(i, 2).Value = Left(.Value, Len(.Value) - 1) & "a"
' If Right(.Value, 1) = "r" Then Cells(i, 2).Value = Left(.Value, Len(.Value)) & "a"
' If Right(.Value, 1) = "b" Then Cells(i, 2).Value = Left(.Value, Len(.Value) - 1) & "a"
If Right(.Value, 1) = "m" Then Cells(i, 2).Value = Left(.Value, Len(.Value)) & "a"
' If Right(.Value, 1) = "e" Then Cells(i, 2).Value = Left(.Value, Len(.Value) - 1) & "a"
' If Right(.Value, 1) = "j" Then Cells(i, 2).Value = Left(.Value, Len(.Value)) & "a"
End With
With Range("B" & i)
' If Right(.Value, 1) = Right(.Value, 2) Then Cells(i, 3).Interior.Color = RGB(255, 0, 0)
End With
Next i
Application.ScreenUpdating = True
End Sub
```

Thanks!

Last edited: