Solved

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

Posted on 2011-03-16
4
347 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
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 the scrolling table in Microsoft Excel using the INDEX function.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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