I have many rows with the first cell (column A) with a long string value (around 100 characters)
I am trying to replace these long string values with shorter ones:
Sub text_replacement()
Dim row As Range
Dim sheet As Worksheet
Set sheet = ActiveSheet
For i = 1 To sheet.UsedRange.Rows.Count
Set row = sheet.Rows(i)
If Cells(i, 1) = "This is a long string value*" Then
Cells(i, 1).Value = "Short and standard value"
End If
Next i
End Sub
I am using the "*" because all these long string values always starts the same. I don't know what is not working, but the below code does not have any effect on the values (and it does not give me any error either)