![]() |
Change date format in Excel footer
I'm trying to change the format in my Excel footer to dd-mmm-yy.
I have changed the short date in my regional settings from dd/MM/yy to dd-MMM-yy. In the Regional settings it shows the format I want. My Excel footer has changed from dd/MM/yy to dd-MM-yy, but still doesn't give a three-letter month. I am using Windows Vista Home Basic and MS Office 2007 -- Tibs |
Change date format in Excel footer
You will have to go for a VBA solution. Set the security level to low/medium
in (Tools|Macro|Security). From workbook press Alt+F11 to launch VBE (Visual Basic Editor). From the left treeview search for the workbook name and click on + to expand it. Within that you should see the following VBAProject(Your_Filename) Microsoft Excel Objects Sheet1(Sheet1) Sheet2(Sheet2) Sheet3(Sheet3) This Workbook Double click 'This WorkBook' and paste the below code to the right code pane. Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.PageSetup.RightFooter = Format(Now, "mmmm dd, yyyy") Next ws End Sub If this post helps click Yes --------------- Jacob Skaria "Tibs" wrote: I'm trying to change the format in my Excel footer to dd-mmm-yy. I have changed the short date in my regional settings from dd/MM/yy to dd-MMM-yy. In the Regional settings it shows the format I want. My Excel footer has changed from dd/MM/yy to dd-MM-yy, but still doesn't give a three-letter month. I am using Windows Vista Home Basic and MS Office 2007 -- Tibs |
Change date format in Excel footer
The format shoul be
ws.PageSetup.RightFooter = Format(Now, "dd-mmm-yy") If this post helps click Yes --------------- Jacob Skaria "Jacob Skaria" wrote: You will have to go for a VBA solution. Set the security level to low/medium in (Tools|Macro|Security). From workbook press Alt+F11 to launch VBE (Visual Basic Editor). From the left treeview search for the workbook name and click on + to expand it. Within that you should see the following VBAProject(Your_Filename) Microsoft Excel Objects Sheet1(Sheet1) Sheet2(Sheet2) Sheet3(Sheet3) This Workbook Double click 'This WorkBook' and paste the below code to the right code pane. Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.PageSetup.RightFooter = Format(Now, "mmmm dd, yyyy") Next ws End Sub If this post helps click Yes --------------- Jacob Skaria "Tibs" wrote: I'm trying to change the format in my Excel footer to dd-mmm-yy. I have changed the short date in my regional settings from dd/MM/yy to dd-MMM-yy. In the Regional settings it shows the format I want. My Excel footer has changed from dd/MM/yy to dd-MM-yy, but still doesn't give a three-letter month. I am using Windows Vista Home Basic and MS Office 2007 -- Tibs |
All times are GMT +1. The time now is 01:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com