How to highlight the active sheet tab in Excel?
In an opening workbook, the active sheet tab distinguishes from others by whitening the tab and bolding the text by default. If you want to make the active worksheet tab more outstanding in your workbook, a method in this article can help you.
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
Please do as follows to highlight the active sheet tab in an opening Excel workbook.
1. In the workbook, you want to highlight the active sheet tab, press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.
2. In the Microsoft Visual Basic for Applications window, please double-click the ThisWorkbook in the left pane, and then copy and paste VBA code into the ThisWorkbook (Code) window. See screenshot:
VBA code: Highlight the active worksheet tab in an opening workbook
Private Sub Workbook_SheetActivate(ByVal Sh As Object) Dim xSheet As Worksheet Application.ScreenUpdating = False For Each xSheet In ThisWorkbook.Worksheets If xSheet.Name = ActiveSheet.Name Then xSheet.Tab.ColorIndex = 6 Else xSheet.Tab.ColorIndex = 2 End If Next Application.ScreenUpdating = True End Sub
3. Press the Alt + Q keys to close the Microsoft Visual Basic for Applications window.
Now, when you activate a sheet, the sheet tab is highlighted in yellow automatically as below screenshot shown:
- How to reference tab name in cell in Excel?
- How to make sheet tab name equal to cell value in Excel?
- How to match the cell value with sheet tab name or vice versa in Excel?