How to Add Data Points to an Existing Graph in Excel – 3 Methods

 

The dataset showcases the Population Growth in USA.

how to add data points to an existing graph in excel

Using the above dataset, you’ll get the following graph.

Scatter plot

To add data points to the existing graph:


Method 1– Inserting a Single Data Point

Insert a Scatter Plot.

Steps:

  • Select C5:C12 >> go to the Insert tab >> choose Scatter.

Inserting a Single Data Point

  • Select the chart >> Click Select Data.

Clicking Select Data

  • In the Select Data Source window, click Edit.

Editing Series values

  • Enter the Series name, here “Population Growth of USA”.
  • Select the Series X and Y values: B4:B12 and C4:C12.

Entering x and y axis values

  • Add the predicted “Population of 372 million” for the “Year 2030” as highlighted below.

adding data points to an existing graph in excel

  • Select the chart >> drag the Resizing Handle to add the new data point.

Drag the resizing tool

Format the chart using the Chart Elements option.

  • Check Axes and Axis Title to name the axes. Here, “Year” and “Population in Millions”.
  • Check Chart Title“Population Growth of USA”.
  • Uncheck Gridlines.

Formatting chart

This is the output.

how to add data points to an existing graph in excel adding single data point

Read More: How to Expand Chart Data Range in Excel


Method 2 – Using Resizing Handles

The dataset showcases the Breakdown of Marketing Expense and Revenue.

Dataset for Using Resizing Handles

Steps:

  • Select C5:C13 >> go to the Insert tab >> select Lines with Markers.

Inserting Line chart with markers

  • Click to select the chart >> drag the Resizing Handles to add the x-axis values.

Utilizing resizing handle to add x axis labels

  • Drag the Resizing Handles to add a new series. Here, “Revenue”.

adding data points to an existing graph in excel

Format the chart in Chart Elements.

  • Check Axes and Axis Title to name the axes. Here, “Month” and “US Dollar”.
  • Add the Chart Title: “Breakdown of Marketing Expense and Revenue”.
  • Check Legend to show the “Marketing Expense” and “Revenue” series.
  • Uncheck  Gridlines.

Formatting with chart elements option

This is the output.

how to add data points to an existing graph in excel with resizing handle

Read More: How to Add Data to an Existing Chart in Excel


Method 3: Utilizing the Select Data Option

Consider the dataset below: Stock Price of Companies.

Dataset for Utilizing Select Data Option

Steps:

  • Select C5:C13 >> go to the Insert tab >> click Insert Column or Bar Chart.

Inserting Bar chart

  • Select the chart >> Click Select Data.

  • Click Edit to add the x-axis labels.

Inserting x axis labels

  • Select B5:B13 as the Axis label range >> click OK.

Selecting x axis labels

  • Click Edit to enter a name for the data series.

how to add data points to an existing graph in excel clicking the edit button

  • Choose C4 (“Stock Price in 2020”) as Series name >> Click OK.

Entering Series Name

  • Select Add to add the data points for a new series.

how to add data points to an existing graph in excel using the add button

  • Select D4 (“Stock Price in 2021”) in Series name >> choose D5:D13 as Series Values.

how to add data points to an existing graph in excel with the select data tool

Format the chart as shown in the previous method to see the output.

how to add data points to an existing graph in excel using select data option

Read More: Selecting Data in Different Columns for an Excel Chart


How to Get Data Points from a Graph in Excel

Use a VBA Code.

Steps:

  • Select the chart >> go to the Developer tab >> click Visual Basic.

How to Get Data Points from a Graph in Excel

The Visual Basic Editor window is displayed.

  • Go to the Insert tab >> select Module.

Inserting Module

Enter the code.

Sub Extract_Chart_Data()

    Dim x_axis_num As Integer
    Dim x_axis_series As Object
    
    On Error Resume Next
    x_axis_count = 2
    x_axis_num = UBound(Application.ActiveChart.SeriesCollection(1).Values)
    Application.Worksheets("Get_Chart_Data").Cells(1, 1) = "X Values"
    
    With Application.Worksheets("Get_Chart_Data")
        .Range(.Cells(2, 1), _
        .Cells(x_axis_num + 1, 1)) = _
        Application.Transpose(ActiveChart.SeriesCollection(1).XValues)
    End With
    
    For Each x_axis_series In Application.ActiveChart.SeriesCollection
        Application.Worksheets("Get_Chart_Data").Cells(1, x_axis_count) = x_axis_series.Name
        With Application.Worksheets("Get_Chart_Data")
            .Range(.Cells(2, x_axis_count), _
            .Cells(x_axis_num + 1, x_axis_count)) = _
            Application.WorksheetFunction.Transpose(x_axis_series.Values)
        End With
        x_axis_count = x_axis_count + 1
    Next
    
End Sub

Pasted VBA code

Code Breakdown:

  • the sub-routine is named: Extract_Chart_Data().
  • the variables x_axis_num and x_axis_series are defined as Integer and Object data types.
  • the x_axis_count is set to 2 and the UBound function is applied to get the largest value.
  • the Worksheet object defines the worksheet name, here “Get_Chart_Data” and returns the x-axis values.
  •  the With statement loops through all the x-axis values and returns the values in the worksheet.
  • the For Loop and the With statement iterate and extract the y-axis values and the series names.
  • returns them in the adjacent cells.

VBA code explanation

  • Click Run or press F5 to run the VBA code.

Running VBA code

This is the output.

how to get data points from an existing graph in excel


 Things to Remember

  • Select the chart and run the VBA code, otherwise, the program returns the string of text “X Values”.

Things to remember

  • Rename your worksheet to “Get_Chart_Data” or edit the VBA code to enter a worksheet name.

Renaming worksheet


Practice Section

Practice here.

Practice Section for how to add data points to an existing graph in excel


Download Practice Workbook


Related Articles


<< Go Back to Edit Chart Data | Excel Chart DataExcel Charts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Eshrak Kader
Eshrak Kader

Eshrak Kader is a dedicated professional with a BSc. Degree in Naval Architecture and Marine Engineering from Bangladesh University of Engineering and Technology. He boasts a rich background in Microsoft Office Suite, and over the past year, he has authored over 120 insightful articles for the ExcelDemy. Currently, Eshrak leads a team of 5 in the ExcelDemy Video project and enjoys problem-solving and making videos on Excel. Eshrak’s passion for continuous learning underscores his commitment to excellence in... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo