RE: Formula to find filename

Giganews Newsgroups
Subject: RE: Formula to find filename
Posted by:  Gary''s Student
Date: Sun, 5 Aug 2007

=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)

--
Gary''s Student - gsnu200735

"Kevin" wrote:

> Hi
>
> I have a written the file path of File A in a cell of another spreadsheet,
> say File B. The file path would be written as below
> C:\MY Files\Media\Test.doc
>
> I need  a excel cell formula which can return the name of the
> file (ie "Test.doc") no matter how many directories or the lenght of the
> address. Note Cell("filename",a1) does not help me because this returns the
> path of the existing spredsheet. Seems I need a way to find where the last
> "\" is in the file path
>
> any ideas
>
> thanks
> --
> Kevin

Replies

None

In response to

Formula to find filename posted by Kevin on Sun, 5 Aug 2007