# Can I change the date FORMAT in the FOOTER of an Excel Worksheet?

**URL:** https://boards.straightdope.com/t/can-i-change-the-date-format-in-the-footer-of-an-excel-worksheet/299800
**Category:** Factual Questions
**Created:** [April 17, 2005, 10:49pm UTC](https://boards.straightdope.com/t/can-i-change-the-date-format-in-the-footer-of-an-excel-worksheet/299800 "2005-04-17T22:49:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Laughing\_Lagomorph](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@Laughing\_Lagomorph](https://boards.straightdope.com/u/Laughing_Lagomorph)
#### Post date: [April 17, 2005, 10:49pm UTC](https://boards.straightdope.com/t/can-i-change-the-date-format-in-the-footer-of-an-excel-worksheet/299800/1 "2005-04-17T22:49:01Z")

</div>

OK, a little info first. This problem I am about to describe is one I have encountered at work. I am at home now and I don’t ever post from work so I am going to try to describe it as best I can and then hopefully one of you smart people will post the answer sometime tonight and I can try it on my work computer tomorrow.

At work I have Windows NT 2000 (Professional?). I know how to format Headers and Footers in Excel Worksheets so that, for instance, the name of the file (&File) or of the sheet (&Sheet) is automatically put at the bottom of the page. I even know how to change the font size, italicize or bold it if I should so desire.

The problem arises when I try to put the date I printed out the sheet (&Date) in the footer. This is a feature that comes in real handy for me but the problem is the format of the date…Excel wants to print it out in an ambiguous format (04-17-05) instead of my preferred format which would be 17 Apr 05. This is a problem because the FDA and its European counterpart prefer that we use unambigous date formats in all of our work.

I know how to format the dates in the cells themselves…that would be a trivial fix but there doesn’t seem to be an equivalent way to format the date in the footer.

I’ve been all through the Header and Footer menu and cannot find a way to mandate the format of the date…it seems to default to its preffered (ambiguous) way. I have also tried changing the preferences in the Control Panel and putting my preferred date format in there but it doesn’t seem to help.

So how about it…is there a way to do this or am I stuck with dates formatted the way Microsoft wants them done?

---

<div class="post-metadata">

### Author: ![RealTronic](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@RealTronic](https://boards.straightdope.com/u/RealTronic)
#### Post date: [April 18, 2005, 12:44am UTC](https://boards.straightdope.com/t/can-i-change-the-date-format-in-the-footer-of-an-excel-worksheet/299800/2 "2005-04-18T00:44:01Z")

</div>

There are two solutions to this, and if you would have Googled it - it would have shown up as the first search result… 😉

> **[Microsoft Support](https://support.microsoft.com/?kbid=213742)**

Basically, either you change your systems regional settings, OR, you make a macro that sets the format of the date for you:

> [@](#):
>
> Sub Change\_Format()  
> ActiveSheet.PageSetup.CenterHeader = Format(Now, “dd mmm yy”)  
> End Sub

If you don’t know how to create a macro:

1. Open the TOOLS menu.
2. Choose “Visual Basic Editor” from the MACRO submenu
3. In the empty window, paste the above code.
4. Choose Run Sub from the RUN menu. (Or press the “play” button)

---

<div class="post-metadata">

### Author: ![Laughing\_Lagomorph](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@Laughing\_Lagomorph](https://boards.straightdope.com/u/Laughing_Lagomorph)
#### Post date: [April 18, 2005, 3:16am UTC](https://boards.straightdope.com/t/can-i-change-the-date-format-in-the-footer-of-an-excel-worksheet/299800/3 "2005-04-18T03:16:02Z")

</div>

I thought about changing the system regional settings but the Help section implied that that might unintentionally change a lot of other things as well.

So no way other than a macro, huh?

---

<div class="post-metadata">

### Author: ![RealTronic](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@RealTronic](https://boards.straightdope.com/u/RealTronic)
#### Post date: [April 19, 2005, 1:52am UTC](https://boards.straightdope.com/t/can-i-change-the-date-format-in-the-footer-of-an-excel-worksheet/299800/4 "2005-04-19T01:52:14Z")

</div>

Well, yeah, if you use Date format values in other worksheets and in other applications such as Access - changing the global date format might cause some unwanted side-effects.

The simplest by far is to just copy that macro into the VBA editor and run it when needed.

---

<div class="post-metadata">

### Author: ![K364](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/k364/32/5_2.png) [@K364](https://boards.straightdope.com/u/K364)
#### Post date: [April 19, 2005, 4:39am UTC](https://boards.straightdope.com/t/can-i-change-the-date-format-in-the-footer-of-an-excel-worksheet/299800/5 "2005-04-19T04:39:56Z")

</div>

You can use the built-in Event Procedures that fire in response to certain actions:

(from Excel VBA Help with **RealTronic’s** code inserted)

```auto

BeforePrint Event
Occurs before the workbook (or anything in it) is printed.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
**Cancel** False when the event occurs. If the event procedure sets this
argument to True, the workbook isn't printed when the procedure is finished.

Example:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
  ActiveSheet.PageSetup.CenterHeader = Format(Now, "dd mmm yy")
End Sub
	

```

So, this runs automatically for you.
