Sub Test_Eric()
Const codeInt As String = "1,32,34,39,44,49,262,352,376,377"
'Const lNumInt As String = "?,?,?,?,?,?,?,?,9,9"
Dim datas, lig As Long, num As String, i As Long, b_fr As Boolean, ci
datas = Range("A1:A50").Value2
ci = Split(codeInt, ",")
For lig = 1 To UBound(datas)
b_fr = False
num = Replace(Replace(Replace(Replace(Replace(datas(lig, 1), " ", ""), ".", ""), "-", ""), ",", ""), "+", "")
If Left(num, 4) = "0033" Then num = Right(num, 9): b_fr = True
i = 1: Do While Mid(num, i, 1) = "0": i = i + 1: Loop ' éliminer zéros du début
If (Len(num) - i + 1 = 9 Or Len(num) = 11 And Left(num, 2) = "33") And Left(num, 2) <> "00" Then num = Right(num, 9): b_fr = True
If b_fr Then ' national
Select Case Left(num, 1)
Case "6", "7" ' mobiles
datas(lig, 1) = "0033-" & num
Case Else ' régionaux
datas(lig, 1) = Format(Val(num), """0033-""#-########")
End Select
ElseIf Left(num, 2) = "00" Then ' international
For i = 0 To UBound(ci)
If Mid(num, 3, Len(ci(i))) = ci(i) Then
datas(lig, 1) = Left(num, Len(ci(i)) + 2) & "-" & Mid(num, Len(ci(i)) + 3)
Exit For
End If
Next i
End If
Next lig
[B1].Resize(UBound(datas)) = datas
End Sub