10

Is there a FORMULA that will display the name of the file in a cell?

I've found scripts that will do it, formulas that will display the sheet name, but no luck finding a formula that will show the filename.

If I have to resort to the script, so be it. But I'd like to use formula if possible.

If this has been asked before, please point me to the post and I will delete this one.

Rubén
  • 34,714
  • 9
  • 70
  • 166
TC76
  • 860
  • 1
  • 8
  • 17
  • Does this answer your question? [Is there a native function in Google Sheets that I can use to get the Spreadsheet name?](https://stackoverflow.com/questions/76111654/is-there-a-native-function-in-google-sheets-that-i-can-use-to-get-the-spreadshee) – horanimal May 03 '23 at 16:30

2 Answers2

1

No—unfortunately this is not possible with any built-in function.

The only way to do this with a function would be to use AppScript to write a custom one, which is essentially back to writing a script.

horanimal
  • 352
  • 1
  • 10
  • 1
    @TC76 Mind accepting this answer so we can remove this as the most-viewed “unanswered” question in the [google-sheets-formula] tag? Sadly almost 4 years later the answer to your question is still “no” :( – horanimal Apr 28 '23 at 21:45
0

But adding this App Script will return the correct value (but slowly):

function GetGoogleSheetName() {
return SpreadsheetApp.getActiveSpreadsheet().getName();
}
Mike Gifford
  • 641
  • 1
  • 8
  • 17