Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barry Clark
 
Posts: n/a
Default Getting only the filename with no extension


This code
Code:
--------------------
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)

--------------------
works almost perfect for my needs; however, I need it to drop the
extension to where only the name of the name of the file is left.

Any thoughts?

Thanks!


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555713

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barry Clark
 
Posts: n/a
Default Getting only the filename with no extension


Wouldn't you know, I found it.
Code:
--------------------
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND(".",CELL("filename", A1))-FIND("[",CELL("filename",A1))-1)
--------------------


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555713

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj
 
Posts: n/a
Default Getting only the filename with no extension

if all of the extensions are three characters try
=left(MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1),len(MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1))-4)

"Barry Clark" wrote:


This code
Code:
--------------------
=MID(CELL("filename",A1),FIND("[",CELL("filename",A1))+1,FIND("]",CELL("filename",A1))-FIND("[",CELL("filename",A1))-1)

--------------------
works almost perfect for my needs; however, I need it to drop the
extension to where only the name of the name of the file is left.

Any thoughts?

Thanks!


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555713


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
Concatinate a filename CLR Excel Discussion (Misc queries) 28 August 1st 05 11:45 PM
filename pointer tanhs Excel Worksheet Functions 0 June 21st 05 02:09 AM
Transformation d'images avec une extension .jpg ou .jpeg en images avec extension .bmp ou .ico imej-clavier Excel Discussion (Misc queries) 1 May 28th 05 05:52 PM
Filename at the very top of Microsoft Excel Window Skyking Excel Discussion (Misc queries) 2 April 28th 05 04:25 AM
Insert value of a cell as a filename Ralph Howarth Excel Worksheet Functions 0 January 18th 05 12:03 AM


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