Date in Excel Header

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to modify the date in an Excel Header? I would like to use an
IF function to subtract one or three days depending upon the current date.
 
You would have to use VBA code to place a cell value into the header.

Here is a basic one.

Sub CellInFooter()
'or Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.PageSetup.CenterFooter = .Range("A1").Value
End With
End Sub

Your date would be taken from the cell in which you have the formula that
subtracts the 1 or 3 days.


Gord Dibben MS Excel MVP
 

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

Back
Top