Note: The other languages of the website are Google-translated. Back to English
English English

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.


Add vertical line to bar chart

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

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.


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:


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


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:


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


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


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).


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.


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:


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.


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.


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.)


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.


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


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.


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.


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (5)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Excellent. I had spent a lot of time to find this. Thank you.
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
Brilliant! Thank you so much!!! I also have spent so much time searching for the instruction to do this! You are marvelous!
This comment was minimized by the moderator on the site
totally worked but this is crazy!! Thank you
This comment was minimized by the moderator on the site
brilliant m8, works like a charm
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations