Interactive Sheet Tab Names - Hot Excel Topic
Officeinstructor Officeinstructor
99.6K subscribers
1,716 views
113

 Published On Feb 23, 2024

Interactive Sheet Tab Names
Using descriptive sheet tab names guides you to the contents of that sheet. But if you have hundreds of sheets most of them will be covered by the horizontal scroll bar. Using short or abbreviated names doesn’t even help.
In this tutorial I show you a clever way to create Interactive sheet tab names. Along the way I will share amazing tips and tricks.
So, Let’s dive in.
Here is the VBA code I created: 
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim TabName As String
Dim NewName As String
On Error Resume Next
TabName = ActiveSheet.Name
NewName = WorksheetFunction.Index(Range("Country"), _
WorksheetFunction.Match(TabName, Range("Code"), 0))
Sheets(TabName).Name = NewName
End Sub

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Dim TabName As String
Dim NewName As String
On Error Resume Next
TabName = Sh.Name
NewName = WorksheetFunction.Index(Range("Code"), _
WorksheetFunction.Match(TabName, Range("Country"), 0))
Sheets(TabName).Name = NewName
End Sub

To book a Corporate Training with Nabil Mourad Check:
www.OfficeInstructor.com

show more

Share/Embed