ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Make text in a cell appear in a footer (https://www.excelbanter.com/excel-programming/410382-make-text-cell-appear-footer.html)

[email protected]

Make text in a cell appear in a footer
 
Is there a way to make text that appears in a cell to appear in the
footer? If so, for example, how would I make A1 appear in the
footer? Thanking you in advance.

Michael

Gary Keramidas

Make text in a cell appear in a footer
 
adapt this to what you need, just watch for word-wrap.


Sub Print_sheet()
Dim ws As Worksheet
Dim rng As Range
Dim lastrow As Long
Set ws = Worksheets("sheet1")
lastrow = ws.Cells(Rows.Count, "I").End(xlUp).Row
Application.ScreenUpdating = False
Set rng = ws.Range("D1:R" & lastrow)

With ws
With .PageSetup
.Orientation = xlLandscape
.FooterMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.4)
.LeftMargin = Application.InchesToPoints(0.4)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.45)
.PrintArea = rng.Address
.HeaderMargin = Application.InchesToPoints(0.25)
.RightFooter = ".Range("A1")
.FitToPagesWide = 1
.CenterHorizontally = True
End With
.PrintPreview
End With
Application.ScreenUpdating = True
End Sub


--


Gary


wrote in message
...
Is there a way to make text that appears in a cell to appear in the
footer? If so, for example, how would I make A1 appear in the
footer? Thanking you in advance.

Michael




ryguy7272

Make text in a cell appear in a footer
 
I think you need to use code:
Sub Begin()
ActiveSheet.PageSetup.LeftHeader = _
Format(Worksheets("Sheet1").Range("B5").Value)
End Sub

From he
http://www.cpearson.com/excel/headfoot.htm

BTW, that is a great resource. If you really want to learn Excel, you
shoudl try to get acquainted with the cpearson stuff!!

Regards,
Ryan--

--
RyGuy


" wrote:

Is there a way to make text that appears in a cell to appear in the
footer? If so, for example, how would I make A1 appear in the
footer? Thanking you in advance.

Michael


[email protected]

Make text in a cell appear in a footer
 
Thanks guys for your help.

M


All times are GMT +1. The time now is 01:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com