Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to add vertical/average line to bar chart in Excel?

When you use a bar chart to show the data, in some cases, you may want to add a vertical line into the bar chart to obviously show the average of the data as below screenshot shown. Now this tutorial is talking about adding a vertical/average line to a bar chart in Excel.

doc-vertical-line-to-bar-1

Add vertical line to bar chart


arrow blue right bubble Add vertical line to bar chart


Now you need to insert a bar chart first.

1. Select your data range, and click Insert > Bar > Bar.

doc-vertical-line-to-bar-2
doc-vertical-line-to-bar-3

2. Then go to a blank cell, here I select Cell A10 to type Y, and then go to the cell next to the Y cell, here is Cell B10 to type X. see screenshot:

doc-vertical-line-to-bar-4

3. In the two cells below Y cell, type 0 and 1 in each cell. See screenshot:

doc-vertical-line-to-bar-5

4. Go to the cell below X cell, here is B11, type =AVERAGE($B$2:$B$9) ($B$2:$B$9 is the data range you want to calculate the average), then press Enter key and drag the fill handle to the next cell below it. See screenshot:

doc-vertical-line-to-bar-6

5. Then right click at the bar chart, and click Select Data from context menu

doc-vertical-line-to-bar-7

6. In Select Data Source dialog, click Add button in the Legend Entries (Series) section.

doc-vertical-line-to-bar-8

7. In the Edit Series dialog, type the new series name you need, and select B11:B12 (B11:B12 is the range you calculate average in step 4).

doc-vertical-line-to-bar-9

8. Click OK > OK to close dialogs. Then select the new series you added in the bar chart, and right click to click Change Series Chart Type in context menu.

doc-vertical-line-to-bar-10

9. In the popped out Change Chart Type dialog, select X Y (Scatter) > Scatter with Straight Lines, and click OK to exit the dialog. See screenshot:

doc-vertical-line-to-bar-11

In Excel 2013, select Combo section under All Charts tab, and select Scatter with Straight Lines from the drop down list in Average series, and click OK to exit the dialog.

doc-vertical-line-to-bar-12

10. Go to the chart and right click to click Select Data in the context menu again.

11. In the Select Data dialog, select Average series and click Edit button.

doc-vertical-line-to-bar-13

12. In Edit Series dialog, select the X values and Y values range. (You just need to add the range cells below Cell Y and Cell X you have typed in step 2 to Y values and X values.)

doc-vertical-line-to-bar-14

13. Click OK > OK to close dialog. Then right click at the right Y axis (the secondary axis), and select Format Axis from the context menu.

doc-vertical-line-to-bar-15

14. In the Format Axis dialog, check Fixed option after Maximum and then type 1 into the textbox beside the Fixed option.

doc-vertical-line-to-bar-16

In Excel 2013, you just need to directly type 1 into Maximum text box in the Format Axis pane.

15. Close dialog. Now the average vertical line has added into bar chart.

doc-vertical-line-to-bar-17

You can format the line by right clicking the line and selecting Format Data Series in the context menu, then you can change the line as you need in the Format Data Series dialog/pane.

doc-vertical-line-to-bar-18


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    R13n · 9 months ago
    brilliant m8, works like a charm
  • To post as a guest, your comment is unpublished.
    Delene · 1 years ago
    totally worked but this is crazy!! Thank you
  • To post as a guest, your comment is unpublished.
    Hang · 1 years ago
    Brilliant! Thank you so much!!! I also have spent so much time searching for the instruction to do this! You are marvelous!
  • To post as a guest, your comment is unpublished.
    Seth · 2 years ago
    This was terrific! Saved me tons of time. I actually used it to illustrate a mean value on a histogram plot (not a bar graph) and it worked just as well. Thanks for putting this together
  • To post as a guest, your comment is unpublished.
    Andrew · 2 years ago
    Excellent. I had spent a lot of time to find this. Thank you.