Color an Excel worksheet tab

How to color a single Excel worksheet tab using Excel and VBA methods

METHOD 1. Color an Excel worksheet tab using the sheet option

EXCEL

Right-click on a worksheet > Tab Color > Select the tab color from Theme Colors, Standard Colors or More Colors

1. Right-click on a worksheet that you want to color.
2. Select Tab Color and select the tab color from Theme Colors, Standard Colors or More Colors.
Note: in this example we are coloring a worksheet named Sheet1.
Right-click on a worksheet, select Tab Color and select the color you want

METHOD 2. Color an Excel worksheet tab using the ribbon option

EXCEL

Select a worksheet > Home tab > Cells group > Format > Tab Color > Select the tab color from Theme Colors, Standard Colors or More Colors

1. Select the worksheet that you want to color.
Note: in this example we are coloring a worksheet named Sheet1.
Select the worksheet you want to color - Excel

2. Select the Home tab. Select Home tab - Excel

3. Click Format in the Cells group.
4. Click Tab Color and select the tab color from Theme Colors, Standard Colors or More Colors.
Select Format, select Tab color and select the color that you want

METHOD 1. Color an Excel worksheet tab using VBA with a color index number

VBA

Sub Color_Worksheet_Tab()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
'color a worksheet, named Sheet1, in green
ws.Tab.ColorIndex = 4

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
PREREQUISITES
Worksheet Name: Have a worksheet named Sheet1.

ADJUSTABLE PARAMETERS
Worksheet to Color: Select the worksheet tab that you want to color by changing the Sheet1 worksheet name in the VBA code to any worksheet in the workbook.
Worksheet Tab Color: Select the worksheet tab color by changing the ColorIndex number.

METHOD 2. Color an Excel worksheet tab using VBA with RGB code

VBA

Sub Color_Worksheet_Tab()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
'color a worksheet, named Sheet1, in green
ws.Tab.Color = RGB(0, 255, 0)

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
PREREQUISITES
Worksheet Name: Have a worksheet named Sheet1.

ADJUSTABLE PARAMETERS
Worksheet to Color: Select the worksheet tab that you want to color by changing the Sheet1 worksheet name in the VBA code to any worksheet in the workbook.
Worksheet Tab Color: Select the worksheet tab color by changing the RGB code.

METHOD 3. Color an Excel worksheet tab using VBA with vb color code

VBA

Sub Color_Worksheet_Tab()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
'color a worksheet, named Sheet1, in green
ws.Tab.Color = vbGreen

End Sub

OBJECTS
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
PREREQUISITES
Worksheet Name: Have a worksheet named Sheet1.

ADJUSTABLE PARAMETERS
Worksheet to Color: Select the worksheet tab that you want to color by changing the Sheet1 worksheet name in the VBA code to any worksheet in the workbook.
Worksheet Tab Color: Select the worksheet tab color by changing the vb color code.

Explanation about how to color a worksheet tab

EXPLANATION

EXPLANATION
This tutorial explains and provides step by step instructions on how to color a single worksheet tab using Excel and VBA methods.

Excel Methods: Using Excel you can color a worksheet tab with a ribbon or sheet option.

VBA Methods: Using VBA you can color a worksheet tab by referencing to a specific worksheet and using either a color index number, RGB code or vb color code.