Option Explicit
Public Sub test()
Dim x
x = Split(ActiveCell)
If UCase(Left(x(0))) = Left(x(0), 1) And UCase(Left(x(1), 1)) = Left(x(1), 1) Then
MsgBox "ok"
Else
MsgBox "not ok"
End If
End Sub
L'objectif a terme est que si une cellule contient un nom (de type Prénom NOM) alors la cellule d'a coté est copiée puis collée dans une autre cellule.
Merci beaucoup pour la réponse mais cela ne semble pas marcher : il me marque erreur, argument non facultatif :s
Option Explicit
Public Sub test()
Dim x
x = Split(ActiveCell)
If UCase(Left(x(0), 1)) = Left(x(0), 1) And UCase(x(1)) = x(1) Then
MsgBox "ok"
Else
MsgBox "not ok"
End If
End Sub