In this Excel VBA Chart Data Label Font Color Tutorial, you learn how to change a Chart's Data Label(s) font color with Excel macros.
This Excel VBA Chart Data Label Font Color Tutorial:
- Applies to Data Labels in a Chart.
- Doesn't apply to the following:
- ActiveX Labels in a worksheet.
- These are the Labels you insert (for example) through the Insert dropdown in the Developer tab of the Excel Ribbon.
- If you want to learn how to change an ActiveX Label's font color with Excel macros, I suggest you read my Excel VBA ActiveX Label Font Color Tutorial. I link to this Tutorial in the Related Excel Macro and VBA Training Materials and Resources Section below.
- Labels in a UserForm.
- These are the Labels you insert (for example) through the Visual Basic Editor's (VBE's) Toolbox.
- If you want to learn how to change a UserForm Label's font color with Excel macros, I suggest you read my Excel VBA UserForm Label Font Color Tutorial. I link to this Tutorial in the Related Excel Macro and VBA Training Materials and Resources Section below.
- ActiveX Labels in a worksheet.
This Excel VBA Chart Data Label Font Color Tutorial is accompanied by an Excel workbook with the data and VBA code I use when describing the step-by-step process below. Get this example workbook (for free) by clicking the button below.
The VBA code in the Excel workbook that accompanies this Excel VBA Chart Data Label Font Color Tutorial is (always) stored in the Visual Basic Editor (VBE). If you don't know how to work with the VBE, I suggest you read my Visual Basic Editor (VBE) Tutorial. I link to this Tutorial in the Related Excel Macro and VBA Training Materials and Resources Section below.
Table of Contents
Related Excel Macro and VBA Training Materials and Resources
The following Excel Macro and VBA Tutorials may help you better understand and implement the contents below.
- Tutorials about general macro and VBA constructs and structures:
- Tutorials for Beginners:
- Excel Macros: Click here to open.
- Excel VBA: Click here to open.
- Enable macros in Excel: Click here to open.
- Work with the Visual Basic Editor (VBE): Click here to open.
- Create Sub procedures: Click here to open.
- Refer to objects (click here to open), including sheets (click here to open).
- Work with:
- Properties: Click here to open.
- Methods: Click here to open.
- Functions: Click here to open.
- Loops: Click here to open.
- Tutorials for Beginners:
- Tutorials with practical VBA applications and macro examples:
- Activate workbook: Click here to open.
- Work with font characteristics: Click here to open.
- Create bar chart: Click here to open.
This Excel VBA Chart Data Label Font Color Tutorial is part of a more comprehensive series of Excel VBA Font Color Tutorials.
- Excel VBA Font Color Index in 2 Easy Steps: Click here to open.
- Excel VBA Font Color RGB in 2 Easy Steps: Click here to open.
- Excel VBA Font Color HEX in 5 Easy Steps: Click here to open.
- Excel VBA Change Font Color Based on Cell Value in 4 Easy Steps: Click here to open.
- Excel VBA Change Font Color for Part of Text in 8 Easy Steps: Click here to open.
- Excel VBA Text Box Font Color in 2 Easy Steps: Click here to open.
- Excel VBA ActiveX Text Box Font Color in 2 Easy Steps: Click here to open.
- Excel VBA UserForm Text Box Font Color in 2 Easy Steps: Click here to open.
- Excel VBA ActiveX Label Font Color in 2 Easy Steps: Click here to open.
- Excel VBA UserForm Label Font Color in 2 Easy Steps: Click here to open.
You can find more Excel and VBA Tutorials in the organized Tutorials Archive: Click here to visit the Archives.
If you want to learn how to automate Excel (and save time) by working with macros and VBA, you may be interested in the following Premium Excel Macro and VBA Training Materials:
- Premium Courses at the Power Spreadsheets Academy: Click here to open.
- Books at the Power Spreadsheets Library: Click here to open.
- VBA Cheat Sheets: Click here to open.
If you want to save time when working with macros and VBA, you may be interested in AutoMacro: Click here to learn more about AutoMacro (affiliate link). AutoMacro is an add-in for VBA that installs directly into the VBE. Depending on the version, AutoMacro comes loaded with:
- Code generators.
- An extensive code library.
- The ability to create your own code library.
- Advanced coding tools.
If you need consulting services, you may want to consider working with ExcelRescue. ExcelRescue is my usual suggestion for people who (like you) may need help with Excel tasks/projects: Click here to visit ExcelRescue (affiliate link).
The VBA Chart Data Label Font Color Snippet Template/Structure
The following is the VBA Chart Data Label font color snippet template/structure I explain (step-by-step) in the Sections below.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
'Chart with data labels is a chart sheet
WorkbookObjectReference.ChartObjectReference.SeriesObjectReference.DataLabelOrDataLabelsObjectReference.Font.ColorOrColorIndex = NewColorOrColorIndexValue
'Chart with data labels is an embedded chart
WorkbookObjectReference.WorksheetObjectReference.ChartObjectObjectReference.Chart.SeriesObjectReference.DataLabelOrDataLabelsObjectReference.Font.ColorOrColorIndex = NewColorOrColorIndexValue
The Example Before VBA Chart Data Label Font Color
This Excel VBA Chart Data Label Font Color Tutorial is accompanied by an Excel workbook with the data and VBA code I use when describing the step-by-step process below. Get this example workbook (for free) by clicking the button below.
The VBA code in the Excel workbook that accompanies this Excel VBA Chart Data Label Font Color Tutorial is (always) stored in the Visual Basic Editor (VBE). If you don't know how to work with the VBE, I suggest you read my Visual Basic Editor (VBE) Tutorial. I link to this Tutorial in the Related Excel Macro and VBA Training Materials and Resources Section above.
The example worksheet has 2 elements:
- 1 table (cells A6 to B16).
- This table stores the source data for the clustered column chart I create (in the example worksheet).
- Main characteristics:
- 2 columns (Chart Data Label, Chart).
- 1 header row (row 6).
- 10 entries (rows 7 to 16).
- 1 clustered column chart.
- I remove some chart elements (for example: chart title, vertical axis) for purposes of this Excel VBA Chart Data Label Font Color Tutorial.
- I chart the data in the Data column of the source data table.
- This is the chart's only series.
- Data labels are displayed outside the end of the columns.
- These are the data labels the VBA Chart Data Label font color example macro I create (by following the step-by-step process below) works with. In other words: The VBA Chart Data Label font color example macro specifies the font color of these data labels.
- I use the data in the Chart Data Labels column of the source data table as horizontal category labels.
The following image displays the example worksheet before I execute the VBA Chart Data Label font color example macro.

Step 1: Refer to Chart
Refer to the chart with the data label(s) whose font color you want to set.
In other words: Create a VBA expression that returns a Chart object representing the applicable chart (with the data label(s) whose font color you want to set).
The chart you work with can be either of the following:
- A chart sheet.
- An embedded chart.
If you work with a chart sheet, consider explicitly including the following references to create a fully qualified object reference returning the applicable Chart object (representing the chart sheet with the data label(s)).
- A reference to the applicable workbook. The following VBA constructs (among others) may return a Workbook object:
- The Application.ThisWorkbook property.
- The Application.Workbooks and Workbooks.Item properties.
- The Application.ActiveWorkbook property.
- A reference to the applicable chart sheet. The following VBA constructs (among others) may return a Chart object:
- The Workbook.Sheets and Sheets.Item properties.
- The Workbook.Charts and Charts.Item properties.
- The Application.ActiveSheet property.
- The Workbook.ActiveChart property.
If you work with an embedded chart, consider explicitly including the following references to create a fully qualified object reference returning the applicable Chart object (representing the embedded chart with the data label(s)):
- A reference to the applicable workbook. The following VBA constructs (among others) may return a Workbook object:
- The Application.ThisWorkbook property.
- The Application.Workbooks and Workbooks.Item properties.
- The Application.ActiveWorkbook property.
- A reference to the applicable worksheet. The following VBA constructs (among others) may return a Worksheet object:
- The Workbook.Sheets and Sheets.Item properties.
- The Workbook.Worksheets and Worksheets.Item properties.
- The Application.ActiveSheet property.
- A reference to the applicable embedded chart.
- The following VBA constructs (among others) may return a ChartObject object:
- The Worksheet.ChartObjects and ChartObjects.Item methods.
- The Application.Selection property.
- The Workbook.ActiveChart property.
- As a general rule: Use the ChartObject.Chart property to refer to the Chart object inside the ChartObject object.
- The following VBA constructs (among others) may return a ChartObject object:
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
'Chart with data labels is a chart sheet
WorkbookObjectReference.ChartObjectReference
'Chart with data labels is an embedded chart
WorkbookObjectReference.WorksheetObjectReference.ChartObjectObjectReference.Chart
Step 1 Example
I:
- Refer to the chart named “ChartDataLabel” in the “Chart Data Label Font Color” worksheet inside the workbook where the procedure is stored.
- Work with the following VBA constructs to obtain a Chart object representing this chart:
- The Application.ThisWorkbook property: ThisWorkbook.
- The Workbook.Worksheets and Worksheets.Item properties: Worksheets(“Chart Data Label Font Color”).
- The Worksheet.ChartObjects and ChartObjects.Item methods: ChartObjects(“ChartDataLabel”).
- The ChartObject.Chart property: Chart.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
ThisWorkbook.Worksheets("Chart Data Label Font Color").ChartObjects("ChartDataLabel").Chart
Step 2: Refer to Series
Refer to the series whose data label(s) font color you want to set.
In other words: Create a VBA expression that returns a Series object representing the applicable series (with the data label(s) whose font color you want to set).
Do the following to refer to a Series object:
(1) Start with the Chart object reference you created in step #1.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
'Chart with data labels is a chart sheet
WorkbookObjectReference.ChartObjectReference
'Chart with data labels is an embedded chart
WorkbookObjectReference.WorksheetObjectReference.ChartObjectObjectReference.Chart
(2) Consider working with one of the following construct sets to return a Series object:
- The Chart.SeriesCollection and SeriesCollection.Item methods; or
- The Chart.FullSeriesCollection method.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
'Chart with data labels is a chart sheet
WorkbookObjectReference.ChartObjectReference.SeriesObjectReference
'Chart with data labels is an embedded chart
WorkbookObjectReference.WorksheetObjectReference.ChartObjectObjectReference.Chart.SeriesObjectReference
Step 2 Example
I do the following:
(1) Start with the Chart object reference I created in step #1.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
ThisWorkbook.Worksheets("Chart Data Label Font Color").ChartObjects("ChartDataLabel").Chart
(2) Refer to the “Data” series inside the chart.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
ThisWorkbook.Worksheets("Chart Data Label Font Color").ChartObjects("ChartDataLabel").Chart.SeriesCollection("Data")
Step 3: Refer to Data Label(s)
Refer to the data labels whose font color you want to set.
In other words: Create a VBA expression that returns one of the following objects:
- A DataLabel object, representing the individual data label whose font color you want to set.
- A DataLabels collection, representing all data labels (whose font color you want to set) for the applicable series.
Do the following to refer to a DataLabels or DataLabel object:
(1) Start with the Series object reference you created in step #2.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
'Chart with data labels is a chart sheet
WorkbookObjectReference.ChartObjectReference.SeriesObjectReference
'Chart with data labels is an embedded chart
WorkbookObjectReference.WorksheetObjectReference.ChartObjectObjectReference.Chart.SeriesObjectReference
(2) Refer to the Series.DataLabels method to return a DataLabels collection representing all data labels (whose font color you want to set) for the applicable series.
If you're not setting the color for all data labels (represented by the DataLabels collection), consider working with Series.DataLabels and DataLabels.Item methods to return a DataLabel object (representing a single data label).
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
'Chart with data labels is a chart sheet
WorkbookObjectReference.ChartObjectReference.SeriesObjectReference.DataLabelOrDataLabelsObjectReference
'Chart with data labels is an embedded chart
WorkbookObjectReference.WorksheetObjectReference.ChartObjectObjectReference.Chart.SeriesObjectReference.DataLabelOrDataLabelsObjectReference
Step 3 Example
I do the following:
(1) Start with the Series object reference I created in step #2:
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
ThisWorkbook.Worksheets("Chart Data Label Font Color").ChartObjects("ChartDataLabel").Chart.SeriesCollection("Data")
(2) Refer to the DataLabels collection representing all of the series' data labels (whose font color I want to set).
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
ThisWorkbook.Worksheets("Chart Data Label Font Color").ChartObjects("ChartDataLabel").Chart.SeriesCollection("Data").DataLabels
Step 4: Set the Value of the Font.Color or Font.ColorIndex Property
Use either of the following 2 properties to set the applicable data label(s) font color:
- Font.Color.
- Font.ColorIndex.
Do the following to set the value of the Font.Color or Font.ColorIndex property:
(1) Start with the DataLabel or DataLabels object reference you created in step #3.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
'Chart with data labels is a chart sheet
WorkbookObjectReference.ChartObjectReference.SeriesObjectReference.DataLabelOrDataLabelsObjectReference
'Chart with data labels is an embedded chart
WorkbookObjectReference.WorksheetObjectReference.ChartObjectObjectReference.Chart.SeriesObjectReference.DataLabelOrDataLabelsObjectReference
(2) Refer to the following:
- The Font property/object; and
- The Font.Color or Font.ColorIndex property (as applicable).
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
'Chart with data labels is a chart sheet
WorkbookObjectReference.ChartObjectReference.SeriesObjectReference.DataLabelOrDataLabelsObjectReference.Font.ColorOrColorIndex
'Chart with data labels is an embedded chart
WorkbookObjectReference.WorksheetObjectReference.ChartObjectObjectReference.Chart.SeriesObjectReference.DataLabelOrDataLabelsObjectReference.Font.ColorOrColorIndex
(3) Set the value of the Font.Color or Font.ColorIndex property.
If you don't know how to work with the Font.Color or Font.ColorIndex properties, I suggest you read the applicable Tutorials I link to in the Related Excel Macro and VBA Training Materials and Resources Section above.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
'Chart with data labels is a chart sheet
WorkbookObjectReference.ChartObjectReference.SeriesObjectReference.DataLabelOrDataLabelsObjectReference.Font.ColorOrColorIndex = NewColorOrColorIndexValue
'Chart with data labels is an embedded chart
WorkbookObjectReference.WorksheetObjectReference.ChartObjectObjectReference.Chart.SeriesObjectReference.DataLabelOrDataLabelsObjectReference.Font.ColorOrColorIndex = NewColorOrColorIndexValue
Step 4 Example
I do the following:
(1) Start with the DataLabels object reference I created in step #3.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
ThisWorkbook.Worksheets("Chart Data Label Font Color").ChartObjects("ChartDataLabel").Chart.SeriesCollection("Data").DataLabels
(2) Refer to the following properties:
- Font; and
- Font.Color.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
ThisWorkbook.Worksheets("Chart Data Label Font Color").ChartObjects("ChartDataLabel").Chart.SeriesCollection("Data").DataLabels.Font.Color
(3) Use the RGB function to set the value of the Font.Color property (Color = RGB(0, 128, 55)). I specify the Red, Green, and Blue arguments of the RGB function as follows:
- Red: 0.
- Green: 128.
- Blue: 55.
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
ThisWorkbook.Worksheets("Chart Data Label Font Color").ChartObjects("ChartDataLabel").Chart.SeriesCollection("Data").DataLabels.Font.Color = RGB(0, 128, 55)
The full VBA Chart Data Label font color example macro is as follows:
Sub ChartDataLabelFontColor()
'Source: https://powerspreadsheets.com/
'More information: https://powerspreadsheets.com/chart-label-font-color/
'Do the following:
'Steps 1 to 3: Refer to the following objects:
'(1) The "ChartDataLabel" chart in the "Chart Data Label Font Color" worksheet inside this workbook
'(2) The data labels for the "Data" series inside the "ChartDataLabel" chart
'Step 4: Use the RGB function to set the value of the Font.Color property. Specify the red, green, and blue components of the color as follows:
'Red: 0
'Green: 128
'Blue: 55
ThisWorkbook.Worksheets("Chart Data Label Font Color").ChartObjects("ChartDataLabel").Chart.SeriesCollection("Data").DataLabels.Font.Color = RGB(0, 128, 55)
End Sub
The following GIF illustrates the effects of using the VBA Chart Label Font Color example macro.

Download the VBA Chart Data Label Font Color Example Workbook
This Excel VBA Chart Data Label Font Color Tutorial is accompanied by an Excel workbook with the data and VBA code I use when describing the step-by-step process above. Get this example workbook (for free) by clicking the button below.
The VBA code in the Excel workbook that accompanies this Excel VBA Chart Data Label Font Color Tutorial is (always) stored in the Visual Basic Editor (VBE). If you don't know how to work with the VBE, I suggest you read my Visual Basic Editor (VBE) Tutorial. I link to this Tutorial in the Related Excel Macro and VBA Training Materials and Resources Section above.
Related Excel Macro and VBA Training Materials and Resources
The following Excel Macro and VBA Tutorials may help you better understand and implement the contents above.
- Tutorials about general macro and VBA constructs and structures:
- Tutorials for Beginners:
- Excel Macros: Click here to open.
- Excel VBA: Click here to open.
- Enable macros in Excel: Click here to open.
- Work with the Visual Basic Editor (VBE): Click here to open.
- Create Sub procedures: Click here to open.
- Refer to objects (click here to open), including sheets (click here to open).
- Work with:
- Properties: Click here to open.
- Methods: Click here to open.
- Functions: Click here to open.
- Loops: Click here to open.
- Tutorials for Beginners:
- Tutorials with practical VBA applications and macro examples:
- Activate workbook: Click here to open.
- Work with font characteristics: Click here to open.
- Create bar chart: Click here to open.
This Excel VBA Chart Data Label Font Color Tutorial is part of a more comprehensive series of Excel VBA Font Color Tutorials.
- Excel VBA Font Color Index in 2 Easy Steps: Click here to open.
- Excel VBA Font Color RGB in 2 Easy Steps: Click here to open.
- Excel VBA Font Color HEX in 5 Easy Steps: Click here to open.
- Excel VBA Change Font Color Based on Cell Value in 4 Easy Steps: Click here to open.
- Excel VBA Change Font Color for Part of Text in 8 Easy Steps: Click here to open.
- Excel VBA Text Box Font Color in 2 Easy Steps: Click here to open.
- Excel VBA ActiveX Text Box Font Color in 2 Easy Steps: Click here to open.
- Excel VBA UserForm Text Box Font Color in 2 Easy Steps: Click here to open.
- Excel VBA ActiveX Label Font Color in 2 Easy Steps: Click here to open.
- Excel VBA UserForm Label Font Color in 2 Easy Steps: Click here to open.
You can find more Excel and VBA Tutorials in the organized Tutorials Archive: Click here to visit the Archives.
If you want to learn how to automate Excel (and save time) by working with macros and VBA, you may be interested in the following Premium Excel Macro and VBA Training Materials:
- Premium Courses at the Power Spreadsheets Academy: Click here to open.
- Books at the Power Spreadsheets Library: Click here to open.
- VBA Cheat Sheets: Click here to open.
If you want to save time when working with macros and VBA, you may be interested in AutoMacro: Click here to learn more about AutoMacro (affiliate link). AutoMacro is an add-in for VBA that installs directly into the VBE. Depending on the version, AutoMacro comes loaded with:
- Code generators.
- An extensive code library.
- The ability to create your own code library.
- Advanced coding tools.
If you need consulting services, you may want to consider working with ExcelRescue. ExcelRescue is my usual suggestion for people who (like you) may need help with Excel tasks/projects: Click here to visit ExcelRescue (affiliate link).