Function NomMaj(Chaine$)
Dim P%, Q%, N%
P = 1
For N = 1 To Len(Chaine)
If Mid(Chaine, N, 1) = UCase(Mid(Chaine, N, 1)) And Mid(Chaine, N + 1, 1) = UCase(Mid(Chaine, N + 1, 1)) Then
P = N: Exit For
End If
Next N
NomMaj = Mid(Chaine, P)
Q = 1
For N = 2 To Len(Chaine)
If Mid(Chaine, N, 1) <> UCase(Mid(Chaine, N, 1)) And Mid(Chaine, N + 1, 1) = UCase(Mid(Chaine, N + 1, 1)) Then
Q = N: Exit For
End If
Next N
NomMaj = NomMaj & " " & Mid(Chaine, 1, Q)
If NomMaj = 0 Then NomMaj = ""
End Function