How to Add Vertical Line to Histogram in Excel (With Easy Steps)

Get FREE Advanced Excel Exercises with Solutions!

In this article, we will show you how to add vertical line to histogram in Excel. Basically, a histogram is a column chart that displays how frequently a variable occurs within a given range. Moreover, it is a common tool for data analysis in the corporate world. Often you might need to add vertical line to the histogram to indicate some information. You can easily make this chart in Excel. So, without any delay, let’s start the discussion.

Download Practice Workbook

To practice by yourself, download the following workbook.

What Is Histogram in Excel?

A histogram shows the frequency of data in different intervals within the data range. It is a graph with a series of rectangular bars. The number and height of the bars are proportional to the number of different ranges called bins and to the frequency of data within those bins. For example, if you want to create a histogram from the result scores of the students in a class, you can assess the performance of the class at a glance. Because you will know how many students failed, how many of them got good grades, etc. the moment you look at the histogram. It can be very useful during your presentations.

Step-by-Step Procedures to Add Vertical Line to Histogram in Excel

To demonstrate the method we will use the dataset of a class. The dataset contains information on the name of the students and their obtaining marks in the English examination. Let’s follow the steps below to know how to add a vertical line to the histogram in Excel.

STEP 1: Make Dataset Ready

  • Firstly, we need to make the dataset ready.
  • Here, we have taken the following dataset.
  • In the B column, there is information about the student’s name.
  • And, their marks are given in the column.

Sample Dataset for adding vertical line to histogram in Excel

Read More: How to Make a Histogram in Excel Using Data Analysis

STEP 2: Insert Histogram Chart

  • Secondly, we will insert the histogram chart.
  • To do so, select the C5:C15 range to select the marks.
  • After selection, go to the Insert tab.
  • Then, from the Charts group section, you have to select the Insert Statistic Chart and then select Histogram.

Insert histogram Using Insert Tab in Excel

  • Instantly, the histogram will appear.
  • After that, we have to modify the horizontal axis to beautify the histogram.

Result after Insertion of histogram

Read More: How to Plot Histogram in Excel (5 Easy Ways)

STEP 3: Format Axis of Histogram

  • In the following step, double-click on any rectangle of the histogram.
  • As a result, a new window named Format Data Point will appear on the right side of the Excel Sheet.
  • Now, increase the gap width according to your preference.
  • Here, we have made the gap width 15%.

Increase Gap width of histogram

  • Again, double-click on the horizontal axis or bins values.
  • Here, bins indicate the range of the rectangle of the histogram.
  • After that, from the Axis Options, change the Bin width according to your choice.
  • Here, the Bin width represents the width of the rectangle.
  • So, we have made the width 10.
  • Also, you may change the Overflow bin and Underflow bin.
  • Here, the Overflow bin represents the maximum limit of the bin and the Underflow bin indicates the minimum limit of the bin.

Settle axis of histogram

Read More: How to Create a Bin Range in Excel (3 Easy Methods)

Similar Readings

STEP 4: Insert Title of Histogram

  • In the following step, we will insert the title of the histogram.
  • To do so, double-click on the Chart Title.

Insert Chart Title in Excel

  • After that, type the title.
  • Here, we have given the title Histogram.

Change Chart Title of histogram

Read More: How to Make a Histogram in Excel with Two Sets of Data (4 Ways)

STEP 5: Add Vertical Line to Histogram

  • In this step, we will add a vertical line to the histogram.
  • To insert, click on the Insert tab.
  • After that, select Illustrations >> Shapes >> Line to insert the vertical line.

Add vertical line to histogram in Excel using Shapes

  • Instantly, you will see that your mouse cursor will be changed.
  • Then, click close to the point where you want to insert the line.
  • In our case, we add the line between 2 rectangles of the histogram.
  • After that, hold down your SHIFT key on the keyboard.
  • Then, click where you want your line to begin and drag it down to add length to your line.
  • As a result, the line will appear on your graph.

Output after adding vertical line

Read More: How to Create Histogram in Excel Using VBA (With Easy Steps)

STEP 6: Modify Vertical Line

  • But, the vertical line is not clearly visible clearly.
  • Therefore, we need to increase its width and color.
  • To do so, double-click on the vertical line.
  • This will take you to the Shape Format tab.
  • Then, click on the following icon to shape the line.

Modify the color and shape of the Vertical line

  • Instantly, a wizard will come out.
  • From the wizard, we have selected a yellow wide-line option.
  • Here, you can select as per your preference.

Select color and shape of the Vertical line

  • As a result, our modified vertical line is now visible.
  • Moreover, you can move your vertical line in your histogram.
  • To do so, click on the line and drag it left and right as per your wish.

Move the Vertical line left and right between histogram in Excel

Read More: Difference Between Excel Histogram and Bar Graph

Final Output

  • Finally, we have been able to add a vertical line in the histogram.
  • We have placed our line in the range of 66 to 76.

Final result after adding vertical line to histogram

Read More: How to Make Histogram Using Analysis ToolPak (with Easy Steps)

Things To Remember

  • For other types of charts, it is easy to add vertical lines. You can insert vertical lines by using Excel Shapes, applying Combo Chart and Chart Trendline.
  • But, for histograms, you can insert vertical lines just only using Excel Shapes.
  • For other charts, you can also insert dynamic vertical lines. Unfortunately, it is not possible to histogram.


In this article, we have demonstrated how to add vertical line to histogram. There is a practice workbook at the beginning of the article. Go ahead and give it a try. To read similar articles, check out the ExcelDemy website. Last but not least, please use the comment section below to post any questions or make any suggestions you might have.

Related Articles

Sudipta Chandra Sarker

Sudipta Chandra Sarker

Hello! Welcome to my Profile. Currently, I am working and doing research on Microsoft Excel. Here I will be posting articles related to this. My educational degree is BSc in Electrical and Electronic Engineering from Bangladesh University of Engineering and Technology, Bangladesh. I have a great interest in research and development. I always try to gather knowledge from various sources and try to make innovative solutions.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF