Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2019, 11:29 AM
DBlomgren DBlomgren is offline Want only current year in header/footer - How? Windows 10 Want only current year in header/footer - How? Office 2016
Advanced Beginner
Want only current year in header/footer - How?
 
Join Date: Feb 2014
Location: New York, USA
Posts: 82
DBlomgren is on a distinguished road
Default Want only current year in header/footer - How?

Hi, all,
I want to have just the current year in a header in Excel. I'm too lazy to update it every year. So how can I insert just the year in a header (or footer)?

I've tried formulas used in cells:
=YEAR(TODAY())


&YEAR(TODAY())
and they don't work. Does anyone know the magic formula? I want it to appear as:
Text text text 2019
Reply With Quote
  #2  
Old 12-05-2019, 06:09 PM
jeffreybrown jeffreybrown is offline Want only current year in header/footer - How? Windows 10 Want only current year in header/footer - How? Office 2016
Expert
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

Just run this macro once a year. No need to store a date on the worksheet.

Code:
Sub add_date_header()
    ActiveSheet.PageSetup.CenterHeader = Format(Date, "yyyy")
End Sub
Reply With Quote
  #3  
Old 12-09-2019, 04:17 PM
DBlomgren DBlomgren is offline Want only current year in header/footer - How? Windows 10 Want only current year in header/footer - How? Office 2016
Advanced Beginner
Want only current year in header/footer - How?
 
Join Date: Feb 2014
Location: New York, USA
Posts: 82
DBlomgren is on a distinguished road
Default

I think it would be easier to type four numbers than to learn how to run a macro and then remember to run it once a year. :/ But I hope this macro helps someone else. Thank you for your time and effort!
Reply With Quote
Reply

Tags
footer, header, year

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding text to the header and footer without removing all other content in the header and footer digitalelise Word VBA 2 10-23-2019 02:58 AM
Want only current year in header/footer - How? VBA to move selected emails or conversation to current year pst folder webharvest Outlook 1 08-15-2015 01:55 AM
How to save the current page in a new file with all the page settings (header, footer Jamal NUMAN Word 6 03-15-2012 03:27 PM
Want only current year in header/footer - How? How to call current PC date and/or current PC year KIM SOLIS Excel 2 11-04-2011 06:09 PM
Want only current year in header/footer - How? Auto insert current month's name and current year Styler001 Word 4 01-25-2010 06:40 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:20 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft