Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default extract a foldername with a formula-update formula does not work

hello,

=left.,.
The formula is incomplete, i must extract different filename's
E.G.
c:\program files\eag\dir\testing\test.xls

Now the formula must extract c:\program files\eag\dir\

another example:
c:\windows\system\systemroot\test\testing.xls

The formula must extract c:\windows\system\systemroot\

So you can see, the formula must extract the file and its folder, so 2
steps

I can't get it to work, hope you can

Regards,
Niek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default extract a foldername with a formula-update formula does not work

=Left(B102,len(B102)-len(cell with your formula that extracted the
filename))

--
Regards,
Tom Ogilvy

"solo_razor" wrote in message
...
hello,

=left.,.
The formula is incomplete, i must extract different filename's
E.G.
c:\program files\eag\dir\testing\test.xls

Now the formula must extract c:\program files\eag\dir\

another example:
c:\windows\system\systemroot\test\testing.xls

The formula must extract c:\windows\system\systemroot\

So you can see, the formula must extract the file and its folder, so 2
steps

I can't get it to work, hope you can

Regards,
Niek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default extract a foldername with a formula-update formula does not work

I'm not sure which you wanted:

f="c:\program files\eag\dir\testing\test.xls"
mid$(f,1,WorksheetFunction.Find(chr$(22),Worksheet Function.Substitute(f,"\",chr$(22),len(f)-len(join(split(f,"\"),""))-1)))

or

f="c:\program files\eag\dir\testing\test.xls"
mid$(f,WorksheetFunction.Find(chr$(22),WorksheetFu nction.Substitute(f,"\",chr$(22),len(f)-len(join(split(f,"\"),""))-1)))


solo_razor wrote in message ...
hello,

=left.,.
The formula is incomplete, i must extract different filename's
E.G.
c:\program files\eag\dir\testing\test.xls

Now the formula must extract c:\program files\eag\dir\

another example:
c:\windows\system\systemroot\test\testing.xls

The formula must extract c:\windows\system\systemroot\

So you can see, the formula must extract the file and its folder, so 2
steps

I can't get it to work, hope you can

Regards,
Niek



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to update a column in a work based on another work sheet WickerMan New Users to Excel 1 December 4th 09 12:58 PM
formula to work in a 3-d reference with 2 work books capt c Excel Worksheet Functions 1 April 8th 09 08:04 PM
Sorting the cells of a formula causes the formula to not work Jake Excel Worksheet Functions 3 January 31st 09 04:42 AM
update formula in column when another cell formula is changed Susanelm Excel Worksheet Functions 1 June 9th 08 05:06 PM
extract a foldername with a formula solo_razor[_14_] Excel Programming 4 October 30th 03 04:05 PM


All times are GMT +1. The time now is 10:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"