Solved

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

Posted on 2014-11-12
8
97 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
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…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

749 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