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.


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.


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

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


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


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


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


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


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


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


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.

Download Practice Workbook

To practice by yourself, download the following workbook.


Conclusion

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. Last but not least, please use the comment section below to post any questions or make any suggestions you might have.


Related Articles

What is ExcelDemy?

ExcelDemy Learn Excel & Excel Solutions Center provides free Excel tutorials, free support , online Excel training and Excel consultancy services for Excel professionals and businesses. Feel free to contact us with your Excel problems.
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

 

 

ExcelDemy
Logo