# Excel Add Line to Bar Chart (4 Ideal Examples)

To add a line to the bar chart, we will prepare a dataset with a bar chart first.

• Insert months and profit amount in columns B and C respectively.

• Select the whole dataset.
• Go to Column Charts from the Charts section in the Insert tab.

• Select any type of bar chart you want in your datasheet.

### Example 1 – Add a Line to Bar Chart with the AVERAGE Function

• Insert the AVERAGE function below inside cell D5 and copy that to the cell range D6:D10.
`=AVERAGE(\$C\$5:\$C\$10)`

• Select the whole dataset including the average amount.

• Select Recommended Chart from the Charts section in the Insert tab.

• This will open an Insert Chart window.
• Go to Combo from the All Charts section, select Clustered Column- Line, and press OK.

• You can see that a line is shown in the bar chart defining the average amount of profit.

### Example 2 – Use the Excel MEDIAN Function to Add a Line

• Insert the MEDIAN function below in cell D5 and copy it to the cell range D6:D10.
`=MEDIAN(\$C\$5:\$C\$10)`

• Insert a Clustered Column- Line and press OK.

• You can see a line in the bar chart representing the Median Number.

Read More:Â Excel Bar Chart with Line Overlay

### Example 3 – Add a Line to a Bar Chart as the Target Line

• Set up a number as the target value in the dataset and select the whole dataset.

• Create a bar chart.

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

• In the new window, go to Combo from the All Charts section and select Custom Combination.
• Press OK.

• You can see a line in the bar chart as the target line.

Another process to add a line to a bar chart as a target line is illustrated below:

• Create a bar chart with the initial dataset, except for the target amount.

• Right-click on the chart and press on Select Data.

• Select Add from the Legend Entries (Series) section.

• In the Edit Series window, insert the series name as Target Line and insert the series value in cell range D5:D10 from the dataset except for the header.

• Press OK twice.

• Repeat the process discussed initially in this example and you will successfully add a line to the bar chart as the target line.
• You can also add a target line with different values.

### Example 4 – Add a Vertical Line to a Bar Chart

• Create a dataset with the information on profit, target, and average for the first half months of a year.

• Create a horizontal bar chart with the dataset of cell range B4:D10.

• Click on the chart and make the Series Overlap value 100% from the Format Data Series.

• Select cell range E4:E10, press Ctrl + 1, and select the outer line of the chart like this:

• Go to the Home tab and select Paste Special from the Clipboard section.

• Mark the options in the Paste Special window just like this:

• Press OK. The bar chart now looks like this.

• Click on the average bar and put it in the Secondary Axis from the editing panel.

• Select Trendline from the Chart Elements section.

• We have our vertical line in the bar chart.

• After some customization, it looks like this.

## How to Customize the Added Line in Excel Bar Chart

• Select the chart and press Ctrl + 1. It will open a new Format Chat Area panel on the right side.
• In this section, you will get numerous options to edit the line along with the chart.

• You can change the size, color, or type of the line. You can add texts if you need them.
• You can also format the bar chart from its right-side options.

## Related Articles

<< Go Back to How to Edit Bar Graph in Excel | Excel Bar Chart |Â Excel ChartsÂ |Â Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Sanjida Mehrun Guria

Hello! Welcome to my blog. I have completed my Bachelor in Architecture from Ashanullah University of Science & Technology, Dhaka. I am a passionate, goal-oriented person with an immense thirst for knowledge and an attitude to grow continuously. Besides Architectural work, I find it very enthusiastic to work in Excel blogging. Exceldemy is a platform where I have got the opportunity to flourish my skill in Microsoft Excel and therefore, here I will be posting blogs related to... Read Full Bio

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF