Link to home
Start Free TrialLog in
Avatar of Tocogroup
TocogroupFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Is there an Excel function to display the active workbook name in a cell ?

Hi All,

Is there an Excel function I can use to display the name of the workbook currently open. Or can this only be done in VBA ?

Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

=CELL("filename"; A2)
more details on the CELL function:

note: as long as the workbook was not saved, this function will return empty
Define WorkbookName

RefersTo: =GET.DOCUMENT(88)

in A1


It'll give you even if the workbook is not saved.

Avatar of Tocogroup


Thanks Guy. It's almost what I want, except I don't want the full file path. Only the filename. Is this possible ?
Read the sentence as "It'll give you the workbook name even if the workbook is not saved."

Somehow I couldn't edit my post.

Here's the define...

User generated image
But I'm getting a #NAME? error in the cell.
Avatar of krishnakrkc
Flag of India image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Whoops ! Yep you were right. Thanks for that. Works great.