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.
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 which 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 impact of different factors on trend.
And before you create a chart with a horizontal line you need to prepare data for it.
In above data tables, I am getting data from 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.
Steps to Add an Average Line
- 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.
- 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”.
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 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.
Steps to Add a Target Line
First of all, let me show you the data which I am using to create a target line in the chart.
- 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.
- 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.
- Go to → Fill & Line → Line.
- Change line style to “No Line”.
- Now, go to marker section and make following changes.
- Change marker type to Built-In, a horizontal bar, and size 25.
- Marker fill to solid fill.
- Use white color as the fill color.
- Make border style to a solid color.
- And, black color for borders.
- Once you make all the changes to the line you’ll get a chart like I have below.
Congratulations! your chart is ready.
So that’s the whole story about a horizontal line.
And, now if someone asks you “how do I add a horizontal line to an excel chart?” you can show them two different methods and also help them to understand why it’s important.
I'm sure this technique will help you to get better at charting.
Now tell me one thing. Have you ever added a horizontal line in a chart? Or, do you have an alternate method for this? Please share with me in the comment section, I would love to hear from you.
And, please don’t forget to share this tip with your friends.
Must Read Next
About the Author
Puneet is using Excel since his college days. He helped thousands of people to understand the power of the spreadsheets and learn Microsoft Excel. You can ﬁnd him online, tweeting about Excel, on a running track, or sometimes hiking up a mountain.