This function returns incorrect value sporadically

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I'm using this function in Excel '07 to return the worksheet name into cell
B1 on a sheet.

=RIGHT(CELL("filename",$A$1),LEN(CELL("filename",$A$1))-FIND("]",CELL("filename",$A$1)))

If the sheet name is "WORKSHEET", every so often the function returns
".xlsm]WORKSHEET. This usually occurs when I go to another worksheet, then
come back to this one. When I go into the cell (F2) then hit enter, it
corrects itself.

I have calculation set to automatic.

The workbook size is only about 16MB.

Any ideas?
 
I'm unable to duplicate what you describe.

Try this formula. Does the same thing just written differently:

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
 
Back
Top