Private Sub Worksheet_Change(ByVal Target As Range)
Dim s, n, p
Application.EnableEvents = False
If InStr("6 7", Target.Column) And Target.Count = 1 Then
s = Split(UCase(Application.Trim(Target)))
n = UBound(s) + 1
If n = 2 Then s(1) = Application.Proper(s(1))
If n > 2 Then
p = Int(Abs(Val(InputBox("Entrez le nombre de mots du nom :", , 1))))
p = IIf(p = 0, 1, IIf(p > n, n, p))
For p = p + 1 To n
s(p - 1) = Application.Proper(s(p - 1))
Next
End If
Target = Join(s)
End If
Application.EnableEvents = True
End Sub