Getting a string of data from a file name

S

Stephen King

I need to extract a persons name from a cell that has the filename
for instance =cell("filename") will return T:\actdata\act\excelshets\[abbey
roberts gymstart progress 2006.xls]sheets1
I want just the name I.e abbey roberts
the thing is that name can vary in length I have tried left right and I can
do it in 2 steps using left then right but I cant do it as one formula.


hope you can make sense of that.

TIA
 
D

Dav

If filepath is in cell A1 try

=MID(A1,FIND("[",A1)+1,FIND("gym",A1)-FIND("[",A1)-2)

Regards

Dav
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top