Filter by Categories
Select all
Budget
Business Statements
Calendars
Federal Income Tax
Gantt Chart
GST India
Health, Logs and Personal Trackers
Inventory
Investments
Invoice/ Bill
Maintenance
Payroll & HR
Project Reports & Timelines
Purchase Order/Requisition
Quotation
Rental Ledger
Risk Registers
Sales/ Marketing
SWOT Analysis
Timesheet/ Attendance
UAE VAT
UK VAT
Filter by File Types






How to Add a Vertical Line in a Chart in Microsoft Excel ?

How to add vertical line in a chart in Microsoft Excel

Background

Sometimes while presenting data with an Excel chart we need to highlight a specific point to get the user’s attention there. And the best way for this is to add a vertical line to a chart.

Yes, you heard it right. You can highlight a specific point on a chart with a vertical line. Just look at the below line chart with 12-months of data.

Now, you know the benefit of inserting a vertical line in a chart. But the point is, which is the best method? Well, out of all the methods, we’ve found this method (which we have mentioned here) simple and easy.

Without any further ado here are the steps and please download the sample excel file to follow along.

Steps to Insert a [Static] Vertical Line in a Chart in MS Excel

Here you have a data table with monthly sales quantity and you need to create a line chart and insert a vertical line in it. Please follow these steps.

  1. Enter a new column beside your quantity column and name it “Ver Line”.
  2. Now enter a value “100” for Jan in “Ver Line” column.
  3. Select the entire table and insert a line chart with markers.
  4. You’ll get a chart like this.
  5. Now select the chart and open the “Change Chart Type” options from  Design Tab.
  6. After that change chart type to secondary axis and chart type to “Column Chart”
  7. Now next thing is to adjust axis values for your column bar.
  8. Double click on your secondary axis to open formatting options.
  9. Change the maximum value to 100, as we have entered the same value in Ver Line column.
  10. In same axis options, move down to label position and select none (This will hide secondary axis, yup we don’t need it).
  11. Last but not least, we have to make our column bar little thin so that it will look like a line.
  12. Click on the data bar, go to series option and increase your “Gap Width” to 500%.

Congratulations! You have successfully added a vertical line to your chart. You can download this sample file from here to learn more about this.

Quick Tip: Just enter 100 in the cell where you want to add a vertical line. If you want to add a vertical line in Feb instead of May, just enter the value in Feb.

Steps to Add a [Dynamic] Vertical Line in a Chart

Now it’s time to level up your chart and make a dynamic vertical name. Please follow these simple steps for this.

  1. First of all, you need to insert a scroll bar. Go to developer tab ➜ Insert ➜ Scroll bar.
  2. Right-click on your scroll bar and select format control.
  3. Link your scroll bar to cell C10 and enter 12 for maximum value.
  4. In the end, click OK.
  5. After that go to your data table and insert this formula [=IF(MATCH($A2,$A$2:$A$13,0)=$D$1,100,””)] to cell C2 (Formula Bar) and drag down up to the last cell of the table.
  6. Now you can use the scroll bar to navigate your vertical line in your chart. You can download this sample file from here to learn more about this.

Conclusion

Adding a vertical line in a chart is useful when you want to highlight a specific data point in your chart. There are also some other ways to add a vertical line but we found this method quick and easy. We hope this charting tip will help you to get better at Excel.

Have you ever tried to do this before with your chart?

Content

Macro Codes in Excel

Learn Excel Quickly
Get full list of Excel Macro Codes