Add cell value to footer in printout

EssKayKay

Active Member
Joined
Jan 5, 2003
Messages
448
Office Version
  1. 2007
Platform
  1. Windows
I'm trying to add the value (text) of cell to the footer in a printout. The cell is in a sheet called Property in cell B3. Any suggestions?

Thanks for viewing,
Steve K.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I should add a couple things. I would like the value if cell "B3" printed in the center of the footer. I have other items on the footer's left and right sides. Now maybe I'd even like to include Location: in front of the value in :B3" so it would read something like Location: 1234 Main Street
 
Upvote 0
I think I got this. I referenced the Property sheet's cell B3 in my active sheet as cell X5. Here's my code.

Rich (BB code):
Private Sub Workbook_BeforePrint(Cancel As Boolean)
    With ActiveSheet.PageSetup
       .CenterFooter = "Location: " & Range("X5").Value
    End With
End Sub

I'm still working on how to directly reference sheet Properties.
I'm good for now . .

EDIT - REVISED. . .

Rich (BB code):
   With ActiveSheet.PageSetup
     .CenterFooter = "Location: " & ActiveCell.FormulaR1C1 = "=Property!R[-11]C[-14]"
   End With
 
Last edited:
Upvote 0
I’m back with a similar question. Is there a way to format the center footer as BOLD or change the text/font size?
 
Upvote 0
Record yourself a macro of the process of inserting and formatting the footer. In the recorded macro you will see the formatting codes .

Artik
 
Upvote 0
Record yourself a macro of the process of inserting and formatting the footer. In the recorded macro you will see the formatting codes .

Artik

Thank you Artik for getting back to me so soon. I did try to create a macro as you noted. I have it working if the address is hardcoded in. However, I want the address to come from a cell location (“X5”).

This “hardcoded” line works fine –
.CenterFooter = " &""Tahoma,Bold"" 1234 MAIN STREET "

This one does not work –
.CenterFooter = " &""Tahoma,Bold" & Range("X5").Value

I assume I have some syntax problem. Any suggestions?

Thanks again,
Steve K.
 
Upvote 0
VBA Code:
.CenterFooter = " &""Tahoma,Bold"" " & Range("X5").Value

Artik
 
Upvote 0
Solution
VBA Code:
.CenterFooter = " &""Tahoma,Bold"" " & Range("X5").Value

Artik
VBA Code:
.CenterFooter = " &""Tahoma,Bold"" " & Range("X5").Value

Artik
Once again Artik - thank you. That did what I have in mind. I added one item to increase the font size. It appears to be working.
.CenterFooter = "&12 &""Tahoma,Bold"" " & Range("X5").Value

Much appreciated,
Steve K.
 
Upvote 0

Forum statistics

Threads
1,226,093
Messages
6,188,871
Members
453,505
Latest member
BigVince

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top