Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Formula to get workbook name on a cell (excel 2003)

Posted on 2011-03-16
4
356 Views
Last Modified: 2012-06-27
Thanks,
JP
0
Comment
Question by:easycapital
4 Comments
 
LVL 6

Expert Comment

by:akajohn
ID: 35149498
0
 
LVL 81

Assisted Solution

by:zorvek (Kevin Jones)
zorvek (Kevin Jones) earned 250 total points
ID: 35149512
The formula below returns the workbook file name.

   =IF(CELL("filename", A1)="","",MID(CELL("filename", A1),SEARCH("[",CELL("filename", A1))+1,SEARCH("]",CELL("filename", A1))-SEARCH("[",CELL("filename", A1))-1))

Kevin
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 250 total points
ID: 35149699
This formula should also work to get workbook name and extension

=REPLACE(LEFT(CELL("filename",A1),FIND("]",CELL("filename",A1)&"]")-1),1,FIND("[",CELL("filename",A1)&"["),"")
0
 

Author Closing Comment

by:easycapital
ID: 35151029
Barry,

Your solution was the shortest and simplest.  Thank you Kevin as well.

Thanks,
JP
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

792 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