Link to home
Start Free TrialLog in
Avatar of oliviam
oliviamFlag for United States of America

asked on

Excel Filenames issue

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!
Avatar of ragnarok89
ragnarok89

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.

User generated image
That way, you're not relying on a formula.
Avatar of Zack Barresse
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
Avatar of oliviam

ASKER

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.
Avatar of oliviam

ASKER

also, ragnarok89, I set the footer and this did not work. The Cell still changes.
ASKER CERTIFIED SOLUTION
Avatar of martyk
martyk
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of oliviam

ASKER

Thank you! Worked Perfect.
Great. Your welcome.