Solved

Excel Filenames issue

Posted on 2011-03-21
7
237 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
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…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now