Solved

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

Posted on 2014-11-12
8
95 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 142

Expert Comment

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

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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 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