Bonjour Jaxteller, bonjour le forum,
Pour une cellule (A1 à adapter) :
Sub Macro1()
Dim S As Byte
With Range("A1")
For I = 1 To Len(.Value)
If IsNumeric(Mid(.Value, I, 5)) Then S = I: Exit For
Next I
.Offset(0, 1).Value = Trim(Mid(.Value, S))
.Value = Trim(Mid(.Value, 1, S - 1))
End With
End Sub
Pour une colonne (A à adapter) :
Sub Macro2()
Dim DL As Integer
Dim I As Integer
Dim S As Byte
DL = Cells(Application.Rows.Count, 1).End(xlUp).Row
For I = 1 To DL
S = 0
With Cells(I, 1)
For I = 1 To Len(.Value)
If IsNumeric(Mid(.Value, I, 5)) Then S = I: Exit For
Next I
.Offset(0, 1).Value = Trim(Mid(.Value, S))
.Value = Trim(Mid(.Value, 1, S - 1))
End With
Next I
End Sub
Le code va planter si tu tombes sur 5 chiffres autres que le code postal dans l'adresse. Mais ça doit être assez rare...