We help IT Professionals succeed at work.

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

Tocogroup
Tocogroup asked
on
117 Views
Last Modified: 2014-11-12
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
Comment
Watch Question

Guy Hengel [angelIII / a3]Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009

Commented:
=CELL("filename"; A2)
Guy Hengel [angelIII / a3]Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009

Commented:
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
Define WorkbookName

RefersTo: =GET.DOCUMENT(88)

in A1

=WorkbookName

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

Kris

Author

Commented:
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.

Author

Commented:
Kris

Here's the define...

Screenshot of the define details for WorkbookName
But I'm getting a #NAME? error in the cell.
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Whoops ! Yep you were right. Thanks for that. Works great.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.