Get workbook filename only
For Linux and Mac
=TRIM( RIGHT( SUBSTITUTE( LEFT( CELL("filename"), FIND("#", CELL("filename")) -2 ), "/", REPT(" ", LEN(CELL("filename"))) ), LEN(CELL("filename")) ) )
For Windows
=TRIM( RIGHT( SUBSTITUTE( LEFT( CELL("filename"), FIND("#", CELL("filename")) -2 ), "\", REPT(" ", LEN(CELL("filename"))) ), LEN(CELL("filename")) ) )
The only change is changing the delimiter from /
to \
.
This post is also available in: Greek