referencing the current month in a heading

ericpny2

New Member
Joined
Jun 4, 2011
Messages
33
I have a ton of sheets within a workbook that alll have a heading with the date and other information at the top.

i have used "[tab]" in the heading to fill that area with the name of the tab.

Is there a similar command to fill in the current month?
I tried [month] and also tried referencing a specific cell that contained the month, but i have had no luck. please let me know

Thanks
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Sorry, I don't understand this statement
i have used "[tab]" in the heading to fill that area with the name of the tab.

What is "[tab]"


To get the current month, try

=TEXT(TODAY(),"mmmm")
 
Upvote 0
You would need code for that I think

Code:
Sub test()
ActiveSheet.PageSetup.CenterHeader = Format(Date, "mmmm")
End Sub
 
Upvote 0
[tab] enters the name of the tab. keep in mind this is in a header of the worksheet. if you go to view>page layout, you can see the header there. it is not going into a specific cell. it is more like a microsoft word format
 
Upvote 0
You would need code for that I think

Code:
Sub test()
ActiveSheet.PageSetup.CenterHeader = Format(Date, "mmmm")
End Sub


The problem with that code is that it replaces all of the other information in the header and only puts the month


ALSO: i had it wrong. the function is actually &[tab] and that puts the name of the tab in that postition
 
Last edited:
Upvote 0
lets forget about the month referencing. is there anyway to reference cell A1 in the header so that is reads the contents in that cell?
 
Upvote 0
The problem with that code is that it replaces all of the other information in the header and only puts the month


ALSO: i had it wrong. the function is actually &[tab] and that puts the name of the tab in that postition

Are you saying that it replaces the left header and the right header as well? I find that diffuicult to believe.
 
Upvote 0
Are you saying that it replaces the left header and the right header as well? I find that diffuicult to believe.


No it is not replacing the right and left header, but all of my information is in the center header and the month is needed in the middle of a sentence in the middle header.

it sounds like this requires a code. thanks for your help
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,713
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top