Hello,
Je me permets de déterrer le topic car je dispose d'une base de numéro de téléphone sans aucun formatage.
J'arrive à la nettoyer avec la macros ci-dessus, sauf pour les numéros étranger (composé de + de 10 caractères)
Ce que je souhaite faire à la ligne 11 : Cel = MsgBox Right(Cel, 9) , c'est de récupérer les 9 derniers chiffres de mes numéros de téléphone, mais ma syntaxe pose problème.
Pouvez-vous m'aider ?
Sub FormateTEL()
Dim Cel As Range
Application.ScreenUpdating = False
For Each Cel In Range("h2:h1200")
Cel = Trim(Cel)
Cel = Application.Substitute(Cel, "+", "")
Cel = Application.Substitute(Cel, "-", "")
Cel = Application.Substitute(Cel, "/", "")
Cel = Application.Substitute(Cel, ".", "")
Cel = Application.Substitute(Cel, " ", "")
Cel = MsgBox Right(Cel, 9)
Cel.NumberFormat = "0#"" ""##"" ""##"" ""##"" ""##" 'formate en N° Tel
Next Cel
End Sub