Public NomAvant
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
' On mémorise le Nom mors du clic de la cellule
On Error GoTo Fin
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, [C:C]) Is Nothing Then
If Target = "" Then Exit Sub
NomAvant = Target
End If
Fin:
End Sub
Sub Worksheet_Change(ByVal Target As Range)
' A la fin de la modif, on remplace dans Tableau l'ancien nom par le nouveau
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, [C:C]) Is Nothing Then
On Error GoTo Fin2:
Application.EnableEvents = False
Application.ScreenUpdating = False
With Sheets("tableau")
DL = .Range("C65500").End(xlUp).Row
For L = 10 To DL
If .Cells(L, "C") = NomAvant Then .Cells(L, "C") = Target
Next L
End With
End If
Fin2:
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub