• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Excel Bar Chart with Vertical Line

You are here: Home / Excel Charts / Excel Bar Chart with Vertical Line
Excel Bar Chart with Vertical Line
August 8, 2019 by Mynda Treacy

In this post I’m going to show you a way to create an Excel bar chart with a vertical line. The inspiration was taken from this Tableau chart by Emily Tesoriero:

consumer spending by generation

Unfortunately, adding a vertical line to a bar chart isn’t a simple feat in Excel, but I’ll step you through a workaround that’s relatively painless.

Download Workbook

Enter your email address below to download the sample workbook.

By submitting your email address you agree that we can email you our Excel newsletter.
Please enter a valid email address.

Download the Excel Workbook. Note: This is a .xlsx file please ensure your browser doesn't change the file extension on download.

Creating an Excel Bar Chart with Vertical Line

Watch the Video

Step by Step Written Instructions

My data is split into separate tables for each spend category and I have 3 value columns; the actual spend by generation (column B), the maximum and the average:

creating an Excel bar chart

Step 1: Insert a Bar Chart

Taking the first category; Elec/Hobbies/Clothing, select cells A8:C12 > Insert tab > Bar Chart. It should look like this:

insert bar chart

Step 2: Overlap Series and Set Gap Width

Single left click one of the series (bars) in the chart to select them > CTRL+1 to open the Format Chart Area (or right-click). Set the series overlap to 100% and the gap width to 30%:

overlap series and set gap width

Step 3: Add Data Labels

Select the blue bars (single left-click) > click on the + icon > Data Labels > Inside Base:

add data labels

Step 4: Add the Vertical Line

Select cells D8:D12 containing the Average header and values then CTRL+C to copy. Left click the outer edge of the chart to select it > Home tab > Paste drop down > Special:

add vertical line

It should look like this:

bar chart with added vertical line

Step 5: Add a Trendline

Select the grey bars (left click once) > click the + > Trendline > Linear:

add a trendline

Note: if the two horizontal axes don't end at the same maximum value, edit them to suit. It's important that the scales are the same, otherwise the average line won't be in the correct position.

Step 6: Switch Axis and Hide the Average Series’ Bars

Left click the grey bars > CTRL+1 to open the Format Series dialog box > on the Series Options tab > Secondary Axis:

switch axis and hide the average series' bars

On the Paint tab > set the fill colour to ‘No Fill’:

set no fill

You should be left with a pale grey dotted trendline and an extra axis on the top:

dotted trendline

Step 7: Format the Trendline

Left click the trendline > CTRL+1 to open the format pane. In the paint bucket tab set the colour to a dark grey and change the dash type to suit your preference:

format the trendline

Step 8: Extend the Trendline

We want the trendline to start and finish in line with the top and bottom bars. To do this, go to the Options tab and set the ‘Forecast’ Forward 10:

extend the trendline

Step 9: Formatting

Let’s do some tidying up:

  • Select the bottom horizontal axis > press DELETE.
  • Repeat for the top horizontal axis.
  • Left click to select a gridline in the chart > press DELETE.
  • Left click to select the legend > press DELETE.
  • Left click to select the labels > format font white.
  • Left click on the vertical axis > CTRL+1 to open the Format Axis pane > check the box ‘Categories in reverse order’:

It should now look like this:

apply formatting

Step 10: Chart Title

Left click the chart title > click in the formula bar > type =  then left click on cell B8 containing the spend category. This will link the chart title to the text in cell C8.

Step 11: Rinse and Repeat

Repeat the above steps for the remaining spend categories. Tip: copy the chart and edit the source data (right-click > Select Data to open series dialog box where you can change the cell references).

Step 12: Hide Vertical Axes on Subsequent Charts

Left click the vertical axis > CTRL+1 to open format pane > Labels > Label Position > None:

hide vertical axes on subsequent charts

Align them close together so they can share the vertical axis of the first chart.

Step 13: Create a Legend

I don’t like the built-in legend for Trendlines, so I created my own legend using Shapes available on the Insert tab. Here is my finished result:

create a legend

Excel Bar Chart with Vertical Line

More Excel Charts Posts

picture fill excel charts

Picture Fill Excel Charts

Using a stylish picture fill in your Excel Charts is a simple way to make your data visualizations more captivating and memorable
excel speedometer charts

Excel Speedometer Charts

How to build Excel Speedometer Charts or Gauge Charts as they're also know, why they are BAD and what to use instead.
burn up burn down charts

Excel Project Management Burn Down and Burn Up Charts

Excel Burn Down and Burn Up Charts are easy to make with line or scatter charts. They are useful for monitoring the progress of a project.
wee people font charts

Excel WeePeople Font Charts

Excel WeePeople Font Charts are a nice change from generic shapes for waffle charts, bar/column charts and more.
excel dot map charts

Excel Dot Map Charts

Interactive Excel dot map charts are not built-in, but with some creative use of Excel’s built-in tools we can create something unique.
Excel S Curve Charts

Excel S-Curve Charts

Easy Excel S-curve Charts made with PivotTables for project management. Track progress by including budget amounts.
chart axis switch

Excel Chart Axis Switch

Use radio button form controls to create an Excel chart axis switch enabling you to toggle pannel charts between same axis and own axis.

Excel Charts with Shapes for Infographics

Excel Charts with Shapes for Infographic styling and increased interest in your charts. Easy to insert but there are a few tricks required.
excel pyramid chart

Excel Pyramid Charts

Excel Pyramid charts are useful for visualising demographic data across multiple categories. Let’s look at 3 ways we can build them in Excel.

Highlighting Periods in Excel Charts

Highlighting Periods in Excel Charts helps your users interpret them more quickly and or focus their attention on a point or area.


Category: Excel Charts
Previous Post:working with comments in vbaWorking With Comments in VBA
Next Post:Year on Year Chartsyear on year charts

Reader Interactions

Comments

  1. Priyanka

    October 23, 2020 at 9:39 pm

    The video gives us very clear idea to create bar chart it is very helpful for me.

    Reply
  2. kerim

    May 21, 2020 at 8:02 am

    hi Treacy,

    I’m a big fan of your YouTube channel.

    Quick question, can I use this technique to highlit my top in-flight projects. the idea is the show the top 5 or 10 most progressed projects based on their progress and duration in time.

    As you may know, such reporting is really tricky in Excel and requires high maintenance with not such satisfying results (Gantt charts ) are rarely communicative to business leaders.

    I hope my question can trigger some creativity from your side and look forward to your next video/ tutorial.

    Reply
    • Mynda Treacy

      May 21, 2020 at 9:19 am

      You can use another series in your chart to highlight the top n values. This post explains how to highlight the min and max in charts, but you simply modify the formulas to return the top n. I hope that points you in the right direction. If you get stuck, please post your question and Excel sample file on our forum where we can help you further.

      Reply
  3. em

    May 16, 2020 at 6:54 am

    Is it possible to use this technique in stacked bar chart? I can get it to work with XY Scatter but wanted to see if possible this way.

    Reply
    • Mynda Treacy

      May 16, 2020 at 4:12 pm

      No. Unfortunately, there’s no option to add a trendline in a stacked bar chart.

      Reply
  4. Stephen

    August 9, 2019 at 12:50 pm

    Great work! And a great work-around! 🙂

    Definitely filing this one for reference!

    Reply
    • Mynda Treacy

      August 10, 2019 at 8:28 am

      Thanks, Stephen! Glad you’ll find it useful.

      Reply
  5. Robert Clark

    August 8, 2019 at 6:02 pm

    Great tutorial – many thanks!

    Reply
    • Mynda Treacy

      August 8, 2019 at 8:29 pm

      Thanks, Robert!

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Leave this field empty

Sidebar

More results...

Featured Content

  • 10 Common Excel Mistakes to Avoid
  • Top Excel Functions for Data Analysts
  • Secrets to Building Excel Dashboards in Less Than 15 Minutes
  • Pro Excel Formula Writing Tips
  • Hidden Excel Double-Click Shortcuts
  • Top 10 Intermediate Excel Functions
  • 5 Pro Excel Dashboard Design Tips
  • 5 Excel SUM Function Tricks
  • 239 Excel Keyboard Shortcuts

100 Excel Tips and Tricks eBook

Download Free Tips & Tricks

Subscribe to Our Newsletter

Receive weekly tutorials on Excel, Power Query, Power Pivot, Power BI and More.

We respect your email privacy

Guides and Resources

  • Excel Keyboard Shortcuts
  • Excel Functions
  • Excel Formulas
  • Excel Custom Number Formatting
  • ALT Codes
  • Pivot Tables
  • VLOOKUP
  • VBA
  • Excel Userforms
  • Free Downloads

239 Excel Keyboard Shortcuts

Download Free PDF

Free Webinars

Excel Dashboards Webinar

Watch our free webinars and learn to create Interactive Dashboard Reports in Excel or Power BI

Click Here to Watch Now

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk – For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.