Relative Content

Tag Archive for excelvbacharts

VBA Bar Chart Color Alteration – Referencing adjacent cells?

I am trying to create a Macro that updates the border of all of the bars in the charts of a given sheet, if the referenced data point the bar is linked to is an “Actual” or a “Consensus”. This information is given in the same row, a few cells to the left of the value referenced in the chart.

VBA Code Adding Chart Data Label Works in Debug, not in Tuntime

I’m creating a subprocedure to generate a gauge chart for a report. It’s running fine until I get to the point of adding a data label to the “needle” of the chart. When I run it in debug mode, it works fine but once I try to run the full macro, the data label fails to come through. No errors occur in either scenario. The section of code is under “Needle label”

Set Color codes to the legend text in vba?

Here we picked up one old excel file with a chart generated by one lost vba dated years back.
Obviously, the following is extracted from this post is not the solution.

Excel VBA selecting & deleting labels based on label text not values

Through searching online I have been able to utilize the following code to delete all labels in my graphs that correspond to values of 0. Now unfortunately I need a code that doesn’t delete based on the actual values in my data, but rather the text within the labels. Because I use another data table (i.e. “Value From Cells” setting instead of “Value” in the Label options) for the actual text in the labels that correspond to the graphs in my chart.