How to Add Data Labels to Scatter Plot in Excel (2 Easy Ways)

Need to learn how to add data labels to a Scatter Plot in Excel? We may frequently need to produce a Scatter Plot. After producing this kind of Scatter Plot, go through the following steps to add data labels to the plot to make it easier to interpret. Here, we will take you through 2 easy and convenient methods on how to add data labels to a Scatter Plot in Excel.

Adding data labels to a Scatter Plot includes some easy steps. In this article, we’ll show you how to add data labels to a Scatter Plot in Excel with 2 different methods.

Suppose, we have a Weight List of some individuals.

add data labels to scatter plot excel

We wanna plot the Weight according to the Name of the individual in a Scatter Plot. Also, we want to add data labels to the chart to make it more understandable. Without any further delay, let’s get into the methods to do it.


1. Using Chart Elements Options to Add Data Labels to Scatter Plot in Excel

In our first method, we’ll manually add data labels to the Scatter Plot using the Chart Elements option in Excel. But, before adding the data labels, we have to make the chart from our data table. Follow our steps below very carefully.

Steps:

  • At first, select cells in the B4:C14 range. There are 2 columns in this selected range of cells. The first one is for the Name and the second one is for the Weight (lbs).
  • Then, go to the Insert tab.
  • After that, select Insert Scatter(X, Y) or Bubble Chart > Scatter.

add data labels to scatter plot excel using chart elements option

  • At this moment, we can see the Scatter Plot visualizing our data table.

add data labels to scatter plot excel using chart elements option

  • Secondly, go to the Chart Design tab.
  • Now, select Add Chart Element from the ribbon.
  • From the drop-down list, select Data Labels.
  • After that, click on More Data Label Options from the choices.

add data labels to scatter plot excel using chart elements option

  • By our previous action, a task pane named Format Data Labels opens.
  • Firstly, click on the Label Options icon.
  • In the Label Options, check the box of Value From Cells.
  • Then, select the cells in the B5:B14 range in the Select Data Label Range box. These cells contain the Name of the individuals which we’ll use as our data labels. After that, click OK.

add data labels to scatter plot excel using chart elements option

  • Later, uncheck the box of Y Value in the Label Options.

add data labels to scatter plot excel using chart elements option

  • Finally, our Scatter Plot with data labels looks like the one below.

add data labels to scatter plot excel using chart elements option

  • But, from the image above, we can clearly notice that the data labels of Susan and James look partially unified.
  • So, click on the data label James two times to select this label only.

add data labels to scatter plot excel using chart elements option

  • It also opens the Format Data Label task pane.
  • Now, set the Label Position as Above.

add data labels to scatter plot excel using chart elements option

  • At this moment, it is more visible than before. But not fully distinguishable.

add data labels to scatter plot excel using chart elements option

  • So, select the data label James again.
  • From Label Options, go to Effects.
  • Under the Shadow category, select the shadow as the image below from the Presets.

add data labels to scatter plot excel using chart elements option

  • Finally, our data labels are clearly perceivable from one another.

add data labels to scatter plot excel using chart elements option

  • With the data range, our Scatter Plot with data labels looks like the one below.

add data labels to scatter plot excel using chart elements option


2. Applying Excel VBA Code to Add Data Labels to Scatter Plot

Another alternative to solve the problem is to apply the VBA code to add data labels. Follow our steps below.

  • At first, right-click on the Sheet Name (VBA).
  • Then, select View Code from the options.

add data labels to scatter plot excel applying VBA code

  • At this point, the Microsoft Visual Basic for Applications window opens.
  • Now, go to the Insert tab and select Module.

add data labels to scatter plot excel applying VBA code

  • It opens a code module where you need to paste the code below.
Sub AddDataLabels()
If Left(TypeName(Selection), 5) <> "Chart" Then
MsgBox "Please select the scatter plot first."
Exit Sub
End If
Set StartLabel = _
Application.InputBox("Click on the cell containing the first label", Type:=8)
Application.ScreenUpdating = False
For Each pt In ActiveChart.SeriesCollection(1).Points
pt.ApplyDataLabels xlDataLabelsShowValue
pt.DataLabel.Caption = StartLabel.Value
Set StartLabel = StartLabel.Offset(1)
Next
End Sub

add data labels to scatter plot excel applying VBA code


💡 Explanation of VBA Code:

  • Sub AddDataLabels(): This part names the macro.
  • If Left(TypeName(Selection), 5) <> “Chart” Then: This means, if the chart is not selected. <> operator means address is not equal to.
  • MsgBox “Please select the scatter plot first.”: If the above part is true, then it shows a message box containing Please select the scatter plot first.
  • Application.InputBox(“Click on the cell containing the first label”, Type:=8): This box required an input to recognize the first point’s data label. To get a range from the user we set Type to 8.
  • Application.ScreenUpdating = False: Disable the screen updating at the start of the subroutine to speed up your macro.
  • For Each pt In ActiveChart.SeriesCollection(1).Points: This indicates points in series one on the selected chart.
  • pt.ApplyDataLabels xlDataLabelsShowValue: It applies data labels to each point and displays the data label.
  • pt.DataLabel.Caption = StartLabel.Value: It applies captions to the data labels and they are set as the range we selected in the input box.
  • Set StartLabel = StartLabel.Offset(1): This move down the selection to the next cell which means the cell in the lower row.

  • Then click on the Save icon to save the workbook in Macro-Enabled format.

add data labels to scatter plot excel applying VBA code

  • Then, go to the Developer tab.
  • After that, select Macros from the ribbon.

Applying VBA Code

  • At this point, a Macro wizard opens.
  • Later, select our created macro AddDataLabels and click on Run.

Applying VBA Code

  • However, it shows an error message that Please select the Scatter plot first. Because we can see that we selected cell D2 instead of selecting the chart prior to running this macro.

Applying VBA Code

  • So, first, select the chart, then run the macro again.
  • It opens an Input wizard.
  • Later, give cell B5 as a reference in the Click on the cell containing the first label box. This means the text string in cell B5 is the data label of the first point.
  • At last, click on OK.

Applying VBA Code

  • Finally, we have our Scatter Plot visible with data labels.

Applying VBA Code


How to Remove Data Labels in Excel

In the previous section, we learned how to add data labels in a Scatter Plot. It’s also important to know how to remove them. Follow the ways we stated below to remove data labels from a Scatter Plot.


1. Using Add Chart Element

  • At first, go to the sheet Chart Elements.
  • Then, select the Scatter Plot already inserted.
  • After that, go to the Chart Design tab.
  • Later, select Add Chart Element > Data Labels > None.

Removing Data Labels using chart elements

  • This is how we can remove the data labels.

Removing Data Labels using chart elements


2. Pressing the Delete Key

If you want to select all the data labels in a data series, click it once. Otherwise, click on it twice to select this label only. Now, press the DELETE key on the keyboard to remove data labels from the Scatter Plot.


3. Using the Delete Option

  • Again, go to the sheet named Chart Elements.
  • Then, right-click on any data label.
  • Later, select Delete from the option.

Removing Data Labels using Delete option

Hence, you can remove data labels from your Scatter Plot.

Read More: How to Add Line to Scatter Plot in Excel


Download Practice Workbook

You may download the following Excel workbook for better understanding and practice.


Conclusion

Thank you for reading this article, we hope this was helpful. Please let us know in the comment section if you have any queries or suggestions.


Related Articles


<< Go Back To Edit Scatter Chart in Excel | Scatter Chart in Excel | Excel Charts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Shahriar Abrar Rafid
Shahriar Abrar Rafid

Shahriar Abrar Rafid, BSc, Naval Architecture and Marine Engineering, Bangladesh University of Engineering and Technology, Bangladesh, has worked with the ExcelDemy project for more than 1 year. He has written over 100+ articles for ExcelDemy. He is a professional visual content developer adept at crafting scripts, meticulously editing Excel files, and delivering insightful video tutorials for YouTube channels. His work and learning interests vary from Microsoft Office Suites and Excel to Data Analysis, VBA, and Video recording and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo