The Cell function returns information about the formatting, location, or contents of the upper-left cell in a reference.

**To get the sheet name:**

=MID(CELL(“filename”),FIND(“]”,CELL(“filename”))+1,255)

**To get the workbook name:**

=MID(CELL(“filename”),FIND(“[",CELL("filename"))+1,(FIND("]“,CELL(“filename”))+1)-FIND(“[“,CELL(“filename”))-2)

**To get the path address & workbook name:**

=CELL(“filename”)

**To get the path address:**

=MID(CELL(“filename”),1,FIND(“[“,CELL(“filename”))-1)

**Screenshot // Cell Function Returns Sheet Name, Workbook Name and Path**

The formula listed here: =MID(CELL(“filename”),1,FIND(“[",CELL("filename"))+1, FIND("]“,(CELL(“filename”))-FIND(“[“,CELL(“filename”))-1) seems to be missing a closing parenthesis.

The following function works correctly to return the workbook name: =MID(CELL(“filename”),FIND(“[",CELL("filename"))+1,(FIND("]“,CELL(“filename”))+1)-FIND(“[“,CELL(“filename”))-2)

the function =MID(CELL(“filename”),FIND(“]”,CELL(“filename”))+1,255) seems to be a global function. Putting multiple instaces of this function on separte sheets, always returns the same name

I can’t get this formula to work, but this formula has 8 functions in the argument, I thought you could only have 7 functions in the formula.

The functions listed here return same value if these are used in more than one worksheet or workbook.

“the function =MID(CELL(“”filename””),FIND(“”]””,CELL(“”filename””))+1,255) returns the same value on each sheet unless you add a cell reference after “”filename””.

the formula should look like this when done:

=MID(CELL(“”filename””,b1),FIND(“”]””,CELL(“”filename””,b1))+1,255)

By adding a cell reference after filename, the value returned should be the worksheet name of the proper worksheet and not the same value for all worksheets.”

The formula listed here: =MID(CELL(“filename”),1,FIND(“[",CELL("filename"))+1, FIND("]“,(CELL(“filename”))-FIND(“[“,CELL(“filename”))-1) seems to be missing a closing parenthesis.

“The following function works correctly to return the workbook name:

=MID(CELL(“”filename””),FIND(“”["",CELL(""filename""))+1,(FIND(""]“”,CELL(“”filename””))+1)-FIND(“”[“”,CELL(“”filename””))-2)”

the function =MID(CELL(“filename”),FIND(“]”,CELL(“filename”))+1,255) seems to be a global function. Putting multiple instaces of this function on separte sheets, always returns the same name

I can’t get this formula to work, but this formula has 8 functions in the argument, I thought you could only have 7 functions in the formula.

The functions listed here return same value if these are used in more than one worksheet or workbook…

“the function =MID(CELL(“”filename””),FIND(“”]””,CELL(“”filename””))+1,255) returns the same value on each sheet unless you add a cell reference after “”filename””.

the formula should look like this when done:

=MID(CELL(“”filename””,b1),FIND(“”]””,CELL(“”filename””,b1))+1,255)

By adding a cell reference after filename, the value returned should be the worksheet name of the proper worksheet and not the same value for all worksheets.”

“Thank you for your information, I found it very useful. There is small error in this formula. “”Worksheet function that returns the workbook name:””

The corrected one should read as follow

=MID(CELL(“”filename””),FIND(“”["",CELL(""filename""))+1,FIND(""]“”,CELL(“”filename””))-FIND(“”[“”,CELL(“”filename””))-1) “