From the course: Excel VBA: Managing Files and Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Add or remove data series from a chart

Add or remove data series from a chart - Microsoft Excel Tutorial

From the course: Excel VBA: Managing Files and Data

Start my 1-month free trial

Add or remove data series from a chart

- [Instructor] When you work with charts in Microsoft Excel you will often want to add a data series to a chart that already has data in it. In this movie, I will show you how to do that in Excel VBA. My Sample File is 05_03_AddSeries and that is a macro-enabled workbook. You can find in the Chapter Five folder of the Exercise Files collection. This workbook contains a single worksheet, named March and you can see that I have two series of data for stores named Lovejoy and Thurman. And on the right, you can see a chart and it has data for Lovejoy only. So the goal of our Excel VBA code is to add the Thurman series, with the series name in cell C1, and the data in C2 through C8, to the chart. Before I switch over to the Excel Visual Basic Editor I need to know the name of the chart here with the title Lovejoy. If I want to find the name of the chart I can use the name box. And that is this box here just above the left…

Contents