1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
For i = 1 To 100
For j = 1 To 150
With Sheets("Fevrier").Cells(i, j)
If Not .Comment Is Nothing Then 'Si il y a un commentaire dans la cellule traitee
TxtComm = .Comment.Text 'récupération du commentaire de la cellule traitée
If j = 52 Then TxtComm = Replace(TxtComm, X, Z) ' remplace une chaine X par un chaine Y
Else: TxtComm = Replace(TxtComm, X, Y) ' remplace une chaine X par un chaine Y
End If
.Comment.Text Text:=TxtComm ' on ré injecte le commentaire dans la cellule traitée
TxtCommB = .Comment.Text 'récupération du commentaire de la cellule traitée
TxtCommB = Replace(TxtCommB, T, U) ' remplace une chaine X par un chaine Y
.Comment.Text Text:=TxtCommB ' on ré injecte le commentaire dans la cellule traitée
End If
End With
Next j
Next i |