Solved

Excel Filenames issue

Posted on 2011-03-21
7
241 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
[X]
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
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 …
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 how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

739 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