Private Sub CommandButton1_Click()
...
With Range("D23:D" & dl)
tablo = .Value
For i = 1 To UBound(tablo)
x = Replace(tablo(i, 1), " ", " ")
tablo(i, 1) = Left(Right(x, 13), 2)
If IsError(Right(tablo(i, 1), 1)) Then
tablo(i, 1) = ""
Else
If IsNumeric(Right(tablo(i, 1), 1)) Then
If tablo(i, 1) = "19" Then
tablo(i, 1) = "S1"
Else
If tablo(i, 1) = "21" Then
tablo(i, 1) = "S1 S2"
Else
tablo(i, 1) = "S2"
End If
End If
Else
tablo(i, 1) = ""
End If
End If
Next
End With
With Range("AR23:AR" & dl)
.Value = tablo
End With