Private Sub Test()
Dim r As Long, c As Integer
Dim s As String
' Ajuster pour la plage concernée
For r = 1 To 256
For c = 1 To 256
Cells(r, c) = TraiterChaine(r, c)
Next
Next
End Sub
Private Function TraiterChaine(ByVal r As Integer, ByVal c As Integer) As String
Dim PosD As Integer, PosF As Integer, Taille As Integer
Dim strR As String, strL As String, Str As String
Dim Chaine As String
Chaine = Cells(r, c)
PosD = InStr(Chaine, "(" )
PosF = InStr(Chaine, " )" )
Taille = Len(Chaine)
While PosD > 0 And PosF > 0
Str = Left(Chaine, PosD - 1) & Right(Chaine, Taille - PosF)
Chaine = Str
PosD = InStr(Chaine, "(" )
PosF = InStr(Chaine, " )" )
Taille = Len(Chaine)
Wend
TraiterChaine = Chaine
End Function
|