Sub Remplacement1()
Dim tablo, i&, n%
With ActiveSheet
tablo = .UsedRange.Resize(, 2) 'matrice, plus rapide
For i = 1 To UBound(tablo)
If Left(tablo(i, 1), 1) = "=" Then tablo(i, 1) = "'" & tablo(i, 1) 'apostrophe devant =
If LCase(tablo(i, 1)) Like "*best lap*" Then n = Len(tablo(i, 2)): _
If n > 12 Then tablo(i, 2) = Left(tablo(i, 2), n - 13)
Next
If .FilterMode Then .ShowAllData 'si la feuille est filtrée
.UsedRange.Resize(, 2) = tablo
End With
End Sub
Sub Remplacement2()
Dim tablo, i&, n%
With ActiveSheet
tablo = .UsedRange.Resize(, 2) 'matrice, plus rapide
For i = 1 To UBound(tablo)
If Left(tablo(i, 1), 1) = "=" Then tablo(i, 1) = "'" & tablo(i, 1) 'apostrophe devant =
If LCase(tablo(i, 1)) Like "*best lap*" Then n = Len(tablo(i, 2)): _
If n > 12 Then tablo(i, 2) = Left(tablo(i, 2), n - 13) Else tablo(i, 2) = ""
Next
If .FilterMode Then .ShowAllData 'si la feuille est filtrée
.UsedRange.Resize(, 2) = tablo
End With
End Sub