Msgbox Split("C:\ta\ti\to\tu\fichier.xls","\")(Ubound(Split("C:\ta\ti\to\tu\fichier.xls","\")))
Function NomFichier(str As String) As String
Dim i As Integer
For i = Len(str) To 1 Step -1
If Mid(str, i, 1) = "\" Then
NomFichier = Mid(str, i + 1, Len(str) - i)
Exit Function
End If
Next i
End Function
Function NomFichier2(str As String) As String
Dim Tabl
Tabl = Split(str, "\")
NomFichier2 = Tabl(UBound(Tabl))
End Function
Msgbox Split("C:\ta\ti\to\tu\fichier.xls","\")(Ubound(Split("C:\ta\ti\to\tu\fichier.xls","\")))
=GAUCHE(A1;TROUVE("\";A1)-1)
Là, je ne sais comment procéder .... je souhaiterais ceux à gauche du dernier slach...
[=GAUCHE(A1;CHERCHE(DROITE(A1;EQUIV("/";STXT(A1;NBCAR(A1)-LIGNE($1:$255);1);0));A1;1)-1)/CODE]
Edit : Oups, bonjour JB, j'ai posté sans rafraichir et du coup je n'avais pas vu votre réponse.