Select specific text in cell
Expanding -- it would certainly be possible for a parser in which
the "\" preceding the filename was optional
And I meant to my last post that doing this, or any other customization of
parsing, would be fruitless without the OP coming back and filling us in on
what (if any) restrictions exist on his filenames, the descriptions or the
delimiter separating them.
By the way, IF we had to cater to a 'backslashless' path, and IF the
delimiter between the filename and description is in fact a
space/dash/space, the one-liner would become slightly uglier ...
Function fn(str As String) As String
fn = Trim(Split(Split(Replace(str, ":", "\"), "\") _
(UBound(Split(Replace(str, ":", "\"), "\"))), " - ")(0))
End Function
Rick
|