Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim r
Dim c As Byte
Dim S As Variant
c = 1 'Colonne à contrôler (ici la colonne A)
n = Cells(65536, c).End(3).Row '(Sélectionne la dernière cellule utilisée de la colonne à contrôler)
For r = 1 To n
If Not IsNumeric(Cells(r, c)) Then
G1:
S = InputBox("Cellule : " & Cells(r, c).Address & vbCrLf & "Veuillez saisir un nombre à 10 chiffres", "Saisie non conforme..")
If Len(S) <> 10 Then
GoTo G1
Else
If Not IsNumeric(Left(S, 5)) Then GoTo G1
If Not IsNumeric(Right(S, 5)) Then GoTo G1
End If
Cells(r, c) = CSng(S)
Else
If Len(Cells(r, c)) <> 10 Then
GoTo G1
End If
End If
Next r
End Sub