Posted to microsoft.public.excel.worksheet.functions
|
|
Separating Location and Filename in a cell
Don and Dave,
Thanks very much. You gave me both a formula I could make just a little
change to and a bit of code I could interject into a macro I am building. It
always helps to have a choice in such matters.
--
Best wishes,
Jim
"Don Guillett" wrote:
Sub getfilename()
For Each c In Selection
x = InStrRev(c, "\")
c.Offset(, 1) = Left(c, x)
c.Offset(, 2) = Right(c, Len(c) - x)
Next
End Sub
--
Don Guillett
SalesAid Software
"Jim Jackson" wrote in message
...
I have a long list of Files which include the complete path. I need tro
separate the filename ("JohnDoe.xls") from the first part of the cell
("C:\Files\Clients\"). In some cells the path includes numerous
subfolders
so the formula needs to take that into consideration.
I have seen workable formulas in this site but cannot, for the life of me,
find them now. Any and all help is greatly appreciated.
--
Best wishes,
Jim
|