PDA

View Full Version : Excel - Path in Footnote


Carl Spackler
05-14-2002, 11:04 AM
Anyone know how to attach the path to a footnote in Excel?

&[???]&[File] , if not in the footnote, is there a formula for getting into a cell? I tried one function I found, but it used the system path instead of where I had the file stored.

sb_jim
05-14-2002, 11:21 AM
In a cell in a worksheet you can use this:

=CELL("filename")


In print set up, header and footer, custom footer, you can easily get the workbook and page name, you may need to type in the rest of the path before that unless someone else knows the secret.

Jaelle
05-14-2002, 11:52 AM
If you're up for some VBA you can use:

Sub SetFooter ()
ActiveSheet.PageSetUp.LeftFooter=ActiveWorkbook.Fu llName
End Sub

or if you just want the path, use Path instead of FullName.

Unfortunately, this enters the info as text & therefore it doesn't change if you move the file. There are ways to make this run anytime you print (or anytime you open the file).

I have found the website mrexcel.com to be useful for these sorts of questions.

Ben Kenobi
05-14-2002, 12:06 PM
Here's how to do it automatically (http://www.pcworld.com/howto/article/0,aid,15849,pg,5,00.asp). Why this is not built into Excel is beyond me. Even Word will do it.

Brad Gile
05-17-2002, 04:13 PM
Put this function in a module.

Public Function HERE() As String
HERE = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
End Function

Then in a cell enter (without quotes) "=HERE()"

Arlie_Proctor
05-18-2002, 09:22 PM
Brad:

If you wish to embed the pathname in a cell on the worksheet, no VBA is required. The following will do (including the sheet name):

=CELL("filename",a1)

Arlie

JMO
05-19-2002, 09:32 AM
I blame Bill Gates very much. :horse:

In the header/footer, the system provides a way to show the spreadsheet name and/or the name of the tab, without the path. In the spreadsheet itself, Arlie's approach gives you the entire path. But there's no way to show just the spreadsheet name and/or cell name. Why not allow the complete range of options in both parts of the sheet? Because it would violate MS policy, I think. :viola:

JMO - posting from home.

Freebird
06-12-2002, 10:50 AM
There is a free Excel add-in available at this website:

http://j-walk.com/ss/excel/files/general.htm

The add-in will insert a "Before Print" event into the spreadsheet, so each time you print or print preview, the spreadsheet will check the current path and put it in the footer. That way, if you move the spreadsheet, you don't have to remember to change the footer that is printed. I've used this add-in for years with no problems. It does insert VB code in your spreadsheet, however.