How to Add a Horizontal Line in a Chart in Excel [Steps by Step]

While creating a chart in Excel, you can use a horizontal line as a target line or an average line. It can help you to compare achievement with the target.

Just look at the below chart.

how to add horizontal line to excel chart using best practices

You like it, right? Say “Yes” in the comment section if you like it. OK so listen: Let’s say you have an average value which you want to maintain in your sales throughout the year. Or, a constant target which you want to show in a chart for all the months.

In this case, you can insert a straight horizontal line to present that value. Here’s the thing: This horizontal line can be a dynamic one that will change its value or a line with a fixed value. And in today’s post, I’m going to show you exactly how to do this.

I’m gonna share with you that how you can insert a fixed as well as a dynamic horizontal line in a chart.

1. Add an Average [Horizontal] Line to a Chart

An average line plays an important role whenever you have to study some trend lines and the impact of different factors on-trend. And before you create a chart with a horizontal line you need to prepare data for it.

Before I tell you about these steps let me show how I am setting up the data. Here I am using a dynamic chart to show you that how this will help you to make your presentation super cool. (download this dynamic data table from here) to follow along.

Use Data Table To Add Horizontal Line To Excel Chart

In the above data tables, I am getting data from the raw table to the dynamic table by using a VLOOKUP MATCH. Every time when I change the year in the dynamic table it will automatically change the sales values and the average will be calculated on those sale figures.

Below are the steps you need to follow to create a chart with a horizontal line.

  • First of all, select the data table and insert a column chart.
  • Go To Insert ➜ Charts ➜ Column Charts ➜ 2D Clustered Column Chart. or you can also use Alt + F1 to insert a chart.
  • So now, you have a column chart in your worksheet like below.
Insert A To Add Horizontal Line To Excel Chart
  • Next step is to change that average bars into a horizontal line.
  • For this, select the average column bar and Go to → Design → Type → Change Chart Type.
Go To Design Tab Add Horizontal Line To Excel Chart
  • Once you click on change chart type option, you’ll get a dialog box for formatting.
  • Change the chart type of average from “Column Chart” to “Line Chart With Marker”.
Change Chart Type To Add Horizontal Line To Excel Chart
  • Click OK.

Here is your ready to rock column chart with a average line and make sure to download this sample file from here.

How To Add Horizontal Line To Excel Chart Using Best Practices

One of my colleagues uses this same method to add a median line. You can also use this method to add an average line in a line chart. Steps are totally same, you just have to insert a line chart instead of a column chart. And you will get something like this.

Add Horizontal Line To Excel Chart In A Line Chart

Add a Horizontal Target Line in Column Chart

This is one more method which I often use in my charts is adding a target line. There are several other ways to create a Target Vs. Achievement chart, but target line method is simple & effective. First of all, let me show you the data which I am using to create a target line in the chart.

add horizontal line to excel chart to present a horizontal line

I have used the above table to get the target and actual figures from the month-wise tables and make sure to download the sample file from here. Now let’s start with the steps.

  • Select the dynamic table which I have mentioned above.
  • Insert a column chart. Go To Insert → Charts → Column Charts → 2D Clustered Column Chart.
  • You’ll get a chart like below.
Add Horizontal Line To Excel Chart To Insert A Target Line
  • Now, you have to change the chart type of target bar from Column Chart to Line Chart With Markers. To change the chart type please use same steps which I have used in the previous method.
  • After changing chart type your chart will look something like this.
Add Horizontal Line To Excel Chart In Target Line In Line Chart
  • Now, we have to make some changes in this line chart.
  • After that, make a double click on the line to open formatting option. Once you do that, you’ll get a formatting option dialog box.
  • Make following changes in formatting.
    1. Go to → Fill & Line → Line.
    2. Change line style to “No Line”.
Change Line Type In Line Chart To Add Horizontal Line To Excel Chart
  • Now, go to marker section and make following changes.
    1. Change marker type to Built-In, a horizontal bar, and size 25.
    2. Marker fill to solid fill.
    3. Use white color as the fill color.
    4. Make border style to a solid color.
    5. And, black color for borders.
Make Changes Add Horizontal Line To Excel Chart
  • Once you make all the changes to the line you’ll get a chart like I have below.
Add Horizontal Line To Excel Chart With Target Line

Congratulations! your chart is ready.

Sample File

Download this sample file from here to follow along

 

12 thoughts

Leave a Comment

Your email address will not be published.

  1. It will help if you start by showing the end result formula first and then explain the moves.

    I did not understand a thing of what you said.

    I simply asked the question “how do you add horizontal lines on Excell”

    Reply
  2. Hi,

    I use this method and find that with a very large data set (many years) showing an average and a target line slows down the spreadsheet.

    Is there a way of having a horizontal average line and a horizontal target line by just calculating and then joining the first and last values with a straight line?

    Reply
  3. I have a horizontal line of averages for my FitBit steps per day.
    I now have thousands of days and it takes a long time to calculate the average for all days.
    Is there a way of just calculating the first point and last point and plotting a straight line?

    Reply