ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   This function returns incorrect value sporadically (https://www.excelbanter.com/excel-worksheet-functions/197090-function-returns-incorrect-value-sporadically.html)

Mike

This function returns incorrect value sporadically
 

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?

T. Valko

This function returns incorrect value sporadically
 
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)

--
Biff
Microsoft Excel MVP


"Mike" wrote in message
...

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?





All times are GMT +1. The time now is 07:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com