How do I reference a cell to automatically update in a header

D

Dan

How do I reference a cell in a worksheet to automatically report in a header
or a footer.
 
×

מיכ×ל (מיקי) ×בידן

I believe it could be accomplished with an Event-Macro at the sheets level.
Assuming B5 Text should be reflected as the Header - try this:
------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$5" Then
ActiveSheet.PageSetup.CenterHeader = [B5]
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top