Solved

Excel Filenames issue

Posted on 2011-03-21
7
239 Views
Last Modified: 2012-05-11
Good afternoon,  we have a user and when he has two excel spreadsheets open at a time and goes to print, the file name will be the same on both documents. I know a good fix to this solution is to shut down one of the excel files, but this is difficult when the user is trying to compare documents. His explanation of the issue is below:

When using =cell("filename") in a cell, while printing, the name and path printed is not correct if more than one excel document is open.

Any help would be great!
0
Comment
Question by:oliviam
7 Comments
 
LVL 8

Expert Comment

by:ragnarok89
ID: 35183821
Assuming both excel files have been saved at least once, under different names, you could, in each file, click File > Page Setup > Header/Footer Tab and select the filename to be listed in the header.

Header
That way, you're not relying on a formula.
0
 
LVL 14

Expert Comment

by:Zack Barresse
ID: 35184420
You could use other means other than the CELL() function.  Besides the obvious custom header, you could also use VBA.  Why would you be using the CELL() function anyway?

Zack
0
 

Author Comment

by:oliviam
ID: 35189581
FYI: we have noticed that this is happeneing in 2010 and 2003 Excel. If two excel file names are open and whichever one was opened first the second changes file names to the first.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:oliviam
ID: 35189752
also, ragnarok89, I set the footer and this did not work. The Cell still changes.
0
 
LVL 1

Accepted Solution

by:
martyk earned 500 total points
ID: 35190594
There is a second optional argument to the CELL function: reference. If it is present, then the filename where the reference occurs is returned.  So instead of CELL("filename"), use CELL("filename", A1). This will insure that CELL returns the name of the workbook referred by A1, the current workbook.

Marty
0
 

Author Closing Comment

by:oliviam
ID: 35190920
Thank you! Worked Perfect.
0
 
LVL 1

Expert Comment

by:martyk
ID: 35191774
Great. Your welcome.
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

Suggested Solutions

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…
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;…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
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