Bonjour Skywalkeuse, le Forum,
Ton besoin sous forme macro. Ouvrir l'éditeur VBA par ALT + F11. Puis par CTRL + R ouvrir l'éditeur de projet.
Ensuite sélectionner le dossier Microsoft Excel Objets. Puis clic droit menu Insertion, puis choisir Module.
Et dans ce module insérer le code ci-dessous.
Sub PrenNom()
DerLig = Range("A" & Rows.Count).End(xlUp).Row
For Lig = 2 To DerLig
Set Cel = Range("A" & Lig)
Esp = InStr(1, Cel, " ")
Prenom = Left(Cel, Esp - 1)
Tir = InStr(1, Prenom, "-")
If Tir > 0 Then Ipr = Left(Prenom, 1) & Mid(Prenom, Tir + 1, 1) Else Ipr = Left(Prenom, 1)
Nom = Right(Cel, Len(Cel) - Esp)
Range("B" & Lig) = LCase(Ipr & Nom)
Ipr = "": Nom = ""
Next Lig
End Sub
Les prénoms et Noms commencent à partir de la ligne 2, colonne A. La colonne B recevant la sortie macro.
Bon tests, bonne continuation.