View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
J.E. McGimpsey J.E. McGimpsey is offline
external usenet poster
 
Posts: 493
Default extract a foldername with a formula

one way:

=LEFT(B102, FIND("\",B102,4)-1)

In article ,
solo_razor wrote:

hello,

I have a problem with a formula
my formula begins with
=MID(B102,FIND("*",SUBSTITUTE(B102,"\","*",LEN(B10 2)-LEN(SUBSTITUTE(B102,"\","
"))))+1,LEN(B102))

This formula extracts from cell b102 a filename e.g.
c:\windows\desktop\newfile.xls (b102)
In the cell with the formula the value is then newfile.xls

Now i want to extract from b102 (c:\windows\desktop\new.xls)
c:\windows
Does anybody know how this can made possible?