Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How to extract only file name from folder path string in Excel?

I need to extract the file names from folder path strings in a worksheet Cell
using Worksheet functions. The number of folder levels is variable:

\\test server\app1\Test Files\File Set1\Bin_S(A)

\\test server\app1\Test Files\File Set2\Test Case1\Full Regression
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default How to extract only file name from folder path string in Excel?

JayKay,

For a string in cell A1, array enter (enter using Ctrl-Shift-Enter) this formula

=RIGHT(A1,LEN(A1)-MAX((MID(A1,ROW(INDIRECT("1:" & LEN(A1))),1)="\")*ROW(INDIRECT("1:" & LEN(A1)))))

HTH,
Bernie
MS Excel MVP


"JayKay" wrote in message
...
I need to extract the file names from folder path strings in a worksheet Cell
using Worksheet functions. The number of folder levels is variable:

\\test server\app1\Test Files\File Set1\Bin_S(A)

\\test server\app1\Test Files\File Set2\Test Case1\Full Regression



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
Concatenate path and file string for external reference Michael[_4_] Excel Worksheet Functions 5 May 21st 23 11:44 AM
Launching an XL file gives errors for each folder in path, then opens PCLIVE Excel Discussion (Misc queries) 2 December 26th 07 09:11 PM
Relative Path to a Folder Heliocracy Excel Discussion (Misc queries) 3 October 3rd 07 04:28 PM
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
Setting a path to a folder Boots Excel Discussion (Misc queries) 2 August 10th 06 02:14 PM


All times are GMT +1. The time now is 09:53 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"