Code:
- Type the following formula into the cell where you want to display the file name without the extension:
=LEFT(MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1),FIND(".",MID(CELL("filename"),SEARCH("[",CELL("filename"))+1,SEARCH("]",CELL("filename"))-SEARCH("[",CELL("filename"))-1))-1)
- Press Enter to see the file name displayed in the cell without the extension.
This formula uses the
LEFT function to extract the characters from the left of the file name until the first period (.) is encountered, which is where the file extension starts. By doing this, the file extension is excluded from the displayed file name.