Public Function ExtractDate(target As Range, Optional Ele As Integer)
If target = "" Then Exit Function
temp = Split(target, " ")
On Error GoTo fin
dateinit = temp(2)
jour = CInt(Mid(dateinit, 1, 2))
mois = Mid(dateinit, 3, 3)
nummois = Evaluate("Month(1&""" & mois & """)")
annee = CInt(Mid(dateinit, 6, 2))
'Select Case Ele
' Case 1
' ExtractDate = jour
' Case 2
' ExtractDate = nummois
' Case 3
' ExtractDate = annee
' Case Else
ExtractDate = DateSerial(annee, nummois, jour)
Exit Function
'End Select
fin:
ExtractDate = "Pas de date trouvée"
End Function