=cell("filename")

Copper Contributor

In the past, I have been using the formula in a spreadsheet cell:

=cell("filename")

It returns the path and filename of the current sheet residing in.

 

Using Excel O365 now this same formula returns a circular reference.  I tried:

=cell("filename",A1) and either filename formula returns as a Circular Reference.

 

Any thoughts?

 

6 Replies
I just tried my version (2303 Build 16227.20258) and it worked fine.
that said I know that function is excluded from O365 online version of excel, but I didn't think that was the error it gave.
Are you sure it is that cell giving the error? Did you use the circular reference error tool (under Error Checking)?

@mtarler I didn’t use error checking. I know what a circular reference is. 

old formulas =cell)”file name”) work. All new ones entered return a circular reference error. 

any other thoughts?  I will look for the error checking thingy. 

The error check thing is in the 'Formulas' menu bar inside the 'Formula Auditing' group look for the yellow triangle.
I'm just saying that the simple formula =cell("filename") doesn't appear to have a circular reference error for me (nor do I see how it would). BUT you could have a formula like
=IF(A1<>"", A1)
and if A1 is blank then no problem but once it is no longer blank you will get a circular reference, but that circular reference really has nothing to do with what is in A1. I'm not saying it is this simple, just suggesting you use the Excel tool to clarify the cell(s) that are actually causing the circular reference error.
You can also post the workbook here (or if you can't post here you can use online service like onedrive and share a link) and we can take a look and see if we see something.
I posted a file with the error message in it, but don't see it here!

@dlassalle1gmailcom  i see the file, it is attached.

When I open it (after excel does it's check) I get a #N/A error not a circular reference error:

mtarler_0-1681748399732.png

as soon as I hit 'enter' inside the cell is resolves for me:

mtarler_1-1681748545032.png

 

The #N/A error will happen for a number or reasons but 2 likely cases are:

a) the file is not saved

b) you are accessing this file in the browser

 

That all said, you say it didn't work for you but yet when it first opens it shows me a path I assume is from YOUR system so it did appear to 'work'.