Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Question and Footers

Status
Not open for further replies.

cainemart

Programmer
Nov 28, 2001
70
US
I am using Excel 97 and I want to be able to use the contents of a cell in the footer. Ex: A1=tally I want to be able to make a reference to that cell in my footer and have it display on "tally".

It is really easy in Lotus but I haven't figured out how to do it in Excel.

Thanks!
 
This will work. I've used a Range Name, and would recommend that you also do the same, as it affords you the flexibility of being able to "freely" move (modify) your data, insert rows or columns, etc - WITHOUT having to ALSO adjust your VBA code for the same "hard-coded" cell references.

In the following example, the Range name "tally_name" is assigned to whatever cell you want to place your "text" entry into. It will then place that text entry into the footer.

Sub Set_Footer()
tallyname = Range("tally_name").Value
With ActiveSheet.PageSetup
.LeftFooter = "&""Arial,Regular," & tallyname
End With
End Sub

Hope this helps. :)

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top