Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Nm As Name
Dim FlagNm As Boolean
For Each Nm In ThisWorkbook.Names
If Nm.Name = "Compteur" Then
FlagNm = True
Exit For
End If
Next Nm
If Not FlagNm Then ThisWorkbook.Names.Add Name:="Compteur", RefersToR1C1:="0", Visible:=True
If Not Intersect(Range("E2:H" & Rows.Count), Target) Is Nothing Then
With ThisWorkbook
Tmp = Replace(.Names("Compteur").Value, "=", "")
Tmp = Tmp + 1
.Names("Compteur").Delete
.Names.Add Name:="Compteur", RefersToR1C1:=Tmp
End With
End If
End Sub