Sheet Names

Jborg

Board Regular
Joined
Feb 3, 2012
Messages
180
Office Version
  1. 365
Platform
  1. Windows
Might be possible with VBA??

I have a workbook with 12 sheets for every Month. Sheet Names are January-2019 etc all the way to December-2019

In every sheet in cell R3 i have written 2019.

Is there a way to change 2019 to 2020 in cell R3 and the sheet name will change to January-2020??

Thanks in advance for your help :)
 
Last edited:

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Put this in the ThisWorkbook module:

Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

Dim rng As Range

If InStr(Sh.Name, "-") > 0 Then
    Set rng = Intersect(Target, Sh.Range("R3"))
    If Not rng Is Nothing Then
        If Len(rng.Value) > 0 Then
            Sh.Name = Split(Sh.Name, "-")(0) & "-" & rng.Value
        End If
    End If
End If

End Sub
 
Upvote 0
Steve the Fish

Thanks Alot. It works like a charm :) :)

I appreciate your fast response.
 
Upvote 0

Forum statistics

Threads
1,214,914
Messages
6,122,211
Members
449,074
Latest member
cancansova

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