Solved

Excel Filenames issue

Posted on 2011-03-21
7
240 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

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…
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.
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…

821 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