How to Add a Marker Line in an Excel Graph (3 Suitable Examples)

 

Example 1 – Adding a Marker Line in a Line Chart

Steps:

  • Select cell D5 and enter the following formula:
=IF(MAX($C$5:$C$18)=$C5,1,"")

Adding Marker Line in Line Chart to Add a Marker Line in Excel Graph

  • Drag the Fill Handle to cell D18. This will search for the maximum value and compare each cell value with the maximum value.
  • A 1 will be on the side of the maximum value.

Adding Marker Line in Line Chart to Add a Marker Line in Excel Graph

  • Select the whole data range B4:D18 and then go to Insert Tab > Charts group.
  • Click on the Recommended Charts.

  • A new window will open.
  • Select the Clustered Column chart as shown in the image below.
  • Click OK.

Adding Marker Line in Line Chart to Add a Marker Line in Excel Graph

You will see a new chart with the Columns (Revenue) and Line (Column 1) present.

  • Right-click on the chart and select Change Chart Type.

  • A new window will open.
  • Select the Chart Type for the Revenue as Line with Markers.
  • Set chart type for Column 1 as Clustered Column.
  • Click OK.

The chart is now modified according to our settings.

  • Right-click on the rightmost axis.
  • From the context menu, click on the Format Axis.

  • In the Format Axis side panel, go to the Axis Options and set the Maximum value as 1.

The column has now touched the ceiling of the chart.

  • Click on the plus sign on the side of the chart and Error Bars > More Options.

Adding Marker Line in Line Chart to Add a Marker Line in Excel Graph

  • A new dialog box named Add Error Bar will open.
  • Click on Column 1 and then click OK.

  • A new side panel will open on the right side of the sheet.
  • Select Minus from the Vertical Error Bar.
  • Set the percentage to 100% in the Error Amount.

The chart now has a vertical line to the top of the ceiling.

  • Select the column and right-click on it.
  • From the context menu, click on the Format Data Series.

Adding Marker Line in Line Chart to Add a Marker Line in Excel Graph

  • In the side panel, select No Fill in the Fill Options.
  • And No Line in the Border options.

You will see the marker line added for the maximum value in your Excel graph.

Adding Marker Line in Line Chart to Add a Marker Line in Excel Graph

Read More: How to Draw Target Line in Excel Graph


Example 2 – Adding a Marker Line in a Scatter Plot

Steps

  • Select the range of cells B5:D18 and create a scatter plot.

The scatter plot will look like the below image.

Marker Line Addition in Scatter Plot to Add a Marker Line in Excel Graph

  • Select cell G5 and enter the following formula:

=MAX(C5:C18)

  • Select cell H5 and enter the following formula:

=MAX(D5:D18)

  • Right-click on the chart, and from the context menu, click on Select Data.

  • Select the cell G5 in the Series X values.
  • Select cell H5 in the Series Y values.
  • Click OK.

You will see the data point in the chart in orange.

  • Select the newly added data point and click on the Plus Sign.
  • Go to Error bars > Percentage.

Marker Line Addition in Scatter Plot to Add a Marker Line in Excel Graph

The data point shows two error bars, one in the vertical direction and another in the horizontal direction.

  • Click on the Horizontal Error bar and right-click on it.
  • From the context menu, click on the Format Error Bar.

  • A new side panel named Format Error Bar will appear.
  • From that panel, select Both in the Direction options.
  • Set the Percentage to 0% in the Error Amount.

  • Select the Vertical Error bar without closing the side panel.
  • Select Minus in the Direction option.
  • Set the Percentage to 100% in the Error Amount.

Marker Line Addition in Scatter Plot to Add a Marker Line in Excel Graph

The chart shows the marker line, which marks the Maximum values of both the Unit Price and revenue values.

Read More: How to Draw a Horizontal Line in Excel Graph


Example 3 – Adding a Marker Line in a 2D Column Chart

Steps

  • Select cell E5 and enter the following formula:
=AVERAGE(C5:C18)
  • Repeat the same process for cell E6.
  • Input 0 in cell G5 and input 1 in cell G6.

  • Select the range of cells B4:C18, and go to Insert tab > Charts group.
  • Click on the 2-D Bar.
  • You will notice a 2-D bar chart about the price of products.

Place a Marker Line in 2D Column Graph in Excel

  • Select the 2-D chart, and we will see that there is a chart demonstrating the price of the products.

  • Select the chart and right-click on it.
  • From the context menu, click on Select Data.

Place a Marker Line in 2D Column Graph in Excel

  • Click on the Add Button in the following dialog box.
  • In the Edit Series dialog box, select E5:E6 in the Series Values range box.
  • Click OK.

  • You will see the Average value in the chart.
  • Select the average data bar and right-click on it.
  • From the context menu, click on the Change Series Chart Type.

Place a Marker Line in 2D Column Graph in Excel

  • In the change chart type window, select Clustered Bar in the Unit Price.
  • Select Scatter with Straight Line in the Average.
  • Click OK.

Place a Marker Line in 2D Column Graph in Excel

  • Select the dataset and right-click on it.
  • From the context menu, click on Select Data.

Place a Marker Line in 2D Column Graph in Excel

  • There will be a new dialog box named Select Data Source.
  • Click the previously created Average.
  • Click Edit.

  • In the Edit Series dialog box, select E5:E6 in the Series X values.
  • Select G5:G6 in the Series Y values.
  • Click OK.

You will see that an orange line marks the Average of the Products’ Unit Prices.

Place a Marker Line in 2D Column Graph in Excel

  • Right-click on the axis, and from the side panel, click on the labels
  • From the position of the label, select None from the drop-down menu.

We get the marker line that will denote the Average value of the Product prices.

Place a Marker Line in 2D Column Graph in Excel

Read More: How to Shade Area Between Two Lines in a Chart in Excel


Download the Practice Workbook

Download this practice workbook below.


Get FREE Advanced Excel Exercises with Solutions!
Rubayed Razib Suprov
Rubayed Razib Suprov

Rubayed Razib, holding a BSC degree in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, serves as a devoted member of the ExcelDemy project. He has contributed significantly by authoring numerous articles and showcasing proficiency in VBA. Razib efficiently automates Excel challenges using VBA macros and actively participates in the ExcelDemy forum, providing valuable solutions for user interface challenges. Apart from creating Excel tutorials, he is interested in Data Analysis with MS Excel,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo