Avatar of Tocogroup
Tocogroup
Flag 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 ?

Thanks
T
Microsoft Excel

Avatar of undefined
Last Comment
Tocogroup

8/22/2022 - Mon
Guy Hengel [angelIII / a3]

=CELL("filename"; A2)
Guy Hengel [angelIII / a3]

more details on the CELL function:
http://office.microsoft.com/en-001/excel-help/cell-function-HP010062392.aspx

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

Define WorkbookName

RefersTo: =GET.DOCUMENT(88)

in A1

=WorkbookName

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

Kris
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Tocogroup

ASKER
Thanks Guy. It's almost what I want, except I don't want the full file path. Only the filename. Is this possible ?
krishnakrkc

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.
Tocogroup

ASKER
Kris

Here's the define...

Screenshot of the define details for WorkbookName
But I'm getting a #NAME? error in the cell.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
krishnakrkc

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Tocogroup

ASKER
Whoops ! Yep you were right. Thanks for that. Works great.