Bonsoir à tous
Un petite fonction personnalisée à tester évidemment par le forum
Cdlt
Option Explicit
Public Function Ville(Cellule)
Dim temp As String
If Cellule = "" Or Mid(Cellule, 1, 6) <> "Mairie" Then
Ville = ""
Exit Function
Else
temp = LTrim(Mid(Cellule, 7, Len(Cellule)))
MsgBox temp
If Mid(temp, 1, 2) = "de" Then
temp = Trim(Mid(temp, 4, Len(Cellule)))
End If
If Mid(temp, 1, 2) = "d'" Then
temp = Trim(Mid(temp, 3, Len(Cellule)))
End If
End If
Ville = temp
End Function