dunamic tab name

Scholar

New Member
Joined
Jul 30, 2009
Messages
44
Hello People,

I find it frustrating to keep updating the tab name every month for a report I produce. Especially, since the month is made referrence to in a cell within the worksheet. Is there a way to maybe concatenate or create a formula to keep this current automatically?

Thanks for all your help...past and future!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
You can do this with a macro like this

Code:
Sub Namesheet()
ActiveSheet.Name = Format(Range("A1").Value, "dd-mm-yyyy")
End Sub

change A1 to suit.
 
Upvote 0
or if your date is in say M4, then in an event (paste this into the sheet concerned's code module):
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Parent.Name = Format(Range("M4").Value, "MMM yy")
End Sub
 
Upvote 0
thanks you VoG. Can I apply my own format/wording in a cell that becomes the tab name like say, "Month of Mach 2010", rather then dd-mm-yyyy?
 
Upvote 0
thank you p45cal. Now i am getting ahead of myself, as im a VBA newbie. What if i wanted to add a button to activate this macro?
 
Upvote 0
Try

Code:
Sub Namesheet()
ActiveSheet.Name = "Month of " & Format(Range("A1").Value, "mmmm yyyy")
End Sub

You can assign this to a button from the Forms toolbar.
 
Upvote 0

Forum statistics

Threads
1,214,515
Messages
6,119,973
Members
448,933
Latest member
Bluedbw

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