Display sheetname in Excel cell

I have searched and found that consensus suggesting to use:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255).

This works well except that I get a circular reference error message.
Is there a clever way of removing this error?

thanks
david
MuskettAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
Use this formula...

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

Open in new window


Saurabh...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MuskettAuthor Commented:
Thanks, but exactly the same problem
Saurabh Singh TeotiaCommented:
It doesn't give me a circular reference problem..You don't have to mentioned A1 or cell name in the formula..use the formula as it's

Saurabh...
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

ProfessorJimJamMicrosoft Excel ExpertCommented:
please use my formula and it should work.

=IF(ISERROR(RIGHT(CELL("filename",$IV$65536),LEN(CELL("filename",$IV$65536))-FIND("]",CELL("filename",$IV$65536)))),"This workbook never saved",RIGHT(CELL("filename",$IV$65536),LEN(CELL("filename",$IV$65536))-FIND("]",CELL("filename",$IV$65536))))

Open in new window

MuskettAuthor Commented:
Well my friend, you have uncovered something!
If I put your formula in a new clean workbook it is fine.
If I put it in an existing book, then I get the same error.

Conclusion, the error is not the formula, I have a messy workbook that I need to audit!

Many thanks
david
MuskettAuthor Commented:
The question uncovered a problem with my workbook, the error is not the formula which works well

Thanks for clear and rapid answers
ProfessorJimJamMicrosoft Excel ExpertCommented:
Muskett

did you even bother to try my formula in your messy workbook?
Saurabh Singh TeotiaCommented:
Muskett ,

Then in that case in your workbook you have a formula which is using the formula using the cell itself while calculating the formulas..what i mean by that is lets say i apply a simple formula on a10 which is

=sum(A1:a10)

This will generate a cyclic formula error since a10 is the cell where i'm applying the formula and its part of the formula as well...

In additional to trouble shoot where you have cyclic formulas in ribbon--> goto formulas-->Error Checking-->Circular references..

It will tell you which cell has a circular reference..and in excel..till the time you fill circular reference all the formulas won't work as you need to first fix the same...

Saurabh...
MuskettAuthor Commented:
Sorry professorjimjam, I did not as I did not see your comment until after I found my WB was crapy
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.