Question guys,

Do I need to change "filename" to the name of the workbook?

Should it be automatically change "filename" to its workbook name?

Not the worksheet name, right?

=SUBSTITUTE(LEFT(CELL("filename");FIND("]";CELL("filename"))-1);"[";)