Function FilePath(strPath As String) As String
Dim Nbr As Integer
Dim Nbt As Integer
Dim Trouve As Integer
Nbr = 0
Nbt = 1
strPath = Replace(strPath, "/", "\")
Do
Trouve = InStr(Nbt, strPath, "\")
If Trouve > 0 Then
Nbr = Nbr + 1
Nbt = Trouve + 1
Else
Exit Do
End If
Loop
If Nbr > 2 Then
FilePath = Left$(strPath, InStrRev(strPath, "\"))
Else
FilePath = strPath
End If
End Function
Formule matricielle à valider par Ctrl, Maj et entrée.=GAUCHE(A1;NBCAR(A1)-EQUIV("/";STXT(A1;NBCAR(A1)-LIGNE($1:$255);1);0))
[B][COLOR="DimGray"]=GAUCHE(A1;MAX(SI(ESTERR(CHERCHE("/";A1;LIGNE($1:$255)));0;LIGNE($1:$255))))[/COLOR][/B]
[COLOR="DarkSlateGray"][B]Function tata$(s$)
tata = Left$(s, InStrRev(s, "/"))
End Function[/B][/COLOR]