Solved

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

Posted on 2014-11-12
8
96 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
0
Comment
Question by:Tocogroup
  • 3
  • 3
  • 2
8 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40436979
=CELL("filename"; A2)
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40436982
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
0
 
LVL 18

Expert Comment

by:krishnakrkc
ID: 40436997
Define WorkbookName

RefersTo: =GET.DOCUMENT(88)

in A1

=WorkbookName

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

Kris
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:Tocogroup
ID: 40437000
Thanks Guy. It's almost what I want, except I don't want the full file path. Only the filename. Is this possible ?
0
 
LVL 18

Expert Comment

by:krishnakrkc
ID: 40437008
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.
0
 

Author Comment

by:Tocogroup
ID: 40437012
Kris

Here's the define...

Screenshot of the define details for WorkbookName
But I'm getting a #NAME? error in the cell.
0
 
LVL 18

Accepted Solution

by:
krishnakrkc earned 500 total points
ID: 40437055
The error #NAME? means, you are writing the name wrongly in the cell.
0
 

Author Closing Comment

by:Tocogroup
ID: 40437080
Whoops ! Yep you were right. Thanks for that. Works great.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question