Forum Discussion

Alireza2291's avatar
Alireza2291
Copper Contributor
Apr 01, 2022
Solved

File Name

Hi There, What kind of formula should I use to have the excel file name in a cell WITHOUT the extension of the file, Thanks, Ali
  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Apr 02, 2022

    Alireza2291  Perhaps this:

     

    =MID(CELL("filename"),FIND("[",CELL("filename"))+1,FIND(".xlsx",CELL("filename"))-FIND("[",CELL("filename"))-1)

     

    It assumes that the extension you seek is ".xlsx" since you are working in an Excel file. If you are on a recent version you can avoid the receptive references to CELL() by using the LET function. 

Resources