# How to Add a Vertical Line to a Horizontal Bar Chart

Now we need to add the average value to the chart as a new series. Select the chart. Under the Design menu tab of the Chart Tools section, click on Select Data.

In the dialog that appears, click the Add button under Legend Entries to add the Average Value series.

Excel will provide an Edit Series dialog to specify the name of the series and the location of the values. For  Series Name, we can type in the title directly:

`="Average"`

For Series Values, you can specify the two cells that contain the average values calculation. In the example, this will be:

`=Sales!\$C\$18:\$C\$19`

We’ll be back here later once we change these values to a line…

## Get the latest Excel tips and tricks by joining the newsletter!

Andrew Roberts has been solving business problems with Microsoft Excel for over a decade. Excel Tactics is dedicated to helping you master it.

Join the newsletter to stay on top of the latest articles. Sign up and you'll get a free guide with 10 time-saving keyboard shortcuts!

## 23 thoughts on “How to Add a Vertical Line to a Horizontal Bar Chart”

1. Chris Hick says:

excellent walkthrough – thanks very much

2. Niklas says:

Excellent! This solved the issue I’ve been working on the entire morning!

3. NW says:

Agreed – this is excellent! Thank you – solved the problem I thought I was completely stuck with.

4. Jacqueline Evans says:

At last. Got the line on my chart. Took a few goes but got there eventually.

5. Thanks for the explanation. I recorded the steps mentioned above in a macro and used the same in the VBA code.

6. Charity says:

Great guide, thanks so much. I had almost given up on being able to make the report in Excel the way I’d been asked to!

7. Just superb, thank you. And thank goodness somebody like you exists to help us all.

8. Praveen says:

Awesome !!! Thanks a ton. This helped me a lot..

9. Bilo says:

Is it just me?
After creating a chart, where is it shown how to add a vertical threshold line?
Thanks,

1. Hi Bilo!

The article is broken up into steps to make it easier to follow (it’s very long otherwise!). Please click on the link to page 2 at the bottom or go to step 2 in the Quick Navigation box at the top to get to the next step in the process!

10. Pseudo-Anon says:

Bilo:

No, it’s not just you. At the top of the page in the “Quick Navigation Box” there are links to several pages. The first, “1. Building a Basic Horizontal Bar Chart” shows how to create a chart. In order to add a horizontal line, you need to go through all of the links, from 1 to 5.

11. Rick says:

Thank you. This is very clearly laid out.

12. Neal says:

13. Hans says:

thank you very much, help me solved my headache

14. Raj says:

This is really.. Been pulling my hairs to combine a horizontal bar and line chart for a long long time.. Thanks for sharing

15. Leiah says:

Very helpful guide – excellent !

16. Inge says:

Genius, thank you so much!

17. Chris Picard says:

Very clear steps. Worked like a charm on Office 365

18. David Kan says:

is there a way to add a coloured vertical box instead of a vertical line?

19. David Kan says:

hi, currently, i’m using your method to have 2 lines to have a “selected area”. do you know if its possible to do a box instead of 2 lines? thank you

20. Paweł says:

Wow, remarkable, haven’t thought that this is possible in excel! Thank you!

21. Terry says:

Great post. Not at all obvious or easy, but however you worked it out, well done, and thank you for sharing.