Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default File name insertion in cell

I have the =cell("filename",a1) formula, but what if you only what just the
file name and not the whole path??? This is driving me crazy, that I can't
figure it out.

Thank you
Bonnie

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default File name insertion in cell

File path, file and worksheet name:
=CELL("filename",A1)

File path only:
=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1)

File name only:
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

The sheet name:
=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

More on this can found at Bob Phillips' site.

http://www.xldynamic.com/source/xld.xlFAQ0002.html


Gord Dibben MS Excel MVP

On Thu, 22 Oct 2009 11:55:01 -0700, balterson
wrote:

I have the =cell("filename",a1) formula, but what if you only what just the
file name and not the whole path??? This is driving me crazy, that I can't
figure it out.

Thank you
Bonnie


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default File name insertion in cell

=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)

--
Gary''s Student - gsnu200908


"balterson" wrote:

I have the =cell("filename",a1) formula, but what if you only what just the
file name and not the whole path??? This is driving me crazy, that I can't
figure it out.

Thank you
Bonnie

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default File name insertion in cell

And check your other post, too.

balterson wrote:

I have the =cell("filename",a1) formula, but what if you only what just the
file name and not the whole path??? This is driving me crazy, that I can't
figure it out.

Thank you
Bonnie


--

Dave Peterson
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
cell insertion in a sentence RYNNER Excel Discussion (Misc queries) 3 February 23rd 09 01:55 PM
Automatic Symbol Insertion In Cell Microconfusion Excel Discussion (Misc queries) 1 August 14th 08 11:45 PM
Disable cell reference insertion with PageUp in cell edit mode. Greta Excel Discussion (Misc queries) 0 May 21st 08 03:54 PM
Cell insertion if values not matching Susan Excel Worksheet Functions 2 May 12th 08 05:05 PM
Using a Cell Operation for insertion into a Formula JCary Excel Discussion (Misc queries) 1 March 4th 06 12:22 AM


All times are GMT +1. The time now is 12:29 AM.

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"