ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   when inserting a file name in a cell how do you remove file type (https://www.excelbanter.com/excel-worksheet-functions/103022-when-inserting-file-name-cell-how-do-you-remove-file-type.html)

mikecarpenter21

when inserting a file name in a cell how do you remove file type
 
this is the formula I am using, but I would like for the file type "xls" on
the end not to be there


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

Elkar

when inserting a file name in a cell how do you remove file type
 
You could just subtract 5 from the end of your formula instead of 1.

=MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,
SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-5)

HTH,
Elkar


"mikecarpenter21" wrote:

this is the formula I am using, but I would like for the file type "xls" on
the end not to be there


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



All times are GMT +1. The time now is 02:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com