Pinterest Pixel

Add an Interactive Vertical Column in Your Excel Line Chart

In Excel, it is very easy to add vertical date line Excel chart and make it interactive with... read more

Download Excel Workbook
Bryan
Posted on

Overview

Add an Interactive Vertical Column in Your Excel Line Chart | MyExcelOnline

In Excel, it is very easy to add vertical date line Excel chart and make it interactive with a Scroll Bar!

The reason why I do this is to use the vertical column to highlight a specific point in the Excel chart whilst I am presenting the data to my stakeholders.

Mmmm Steak 🙂

In this example, I show you how easy it is to add vertical date line excel chart & sprinkled with a little magic using three different methods:

Let’s look at each of these methods one-by-one!

 

This is our data:

Add an Interactive Vertical Column in Your Excel Line Chart

Want to know How To Add Vertical Date Line Excel Chart?

*** Watch our video and step by step guide with a free downloadable Excel workbook to practice ***

Watch on YouTube and give it a thumbs up 👍

Add an Interactive Vertical Column in Your Excel Line Chart | MyExcelOnline

 

 

download excel workbook Interactive-Vertical-Column.xlsx

 

Add Vertical Line using Shapes

The easiest way to add vertical line to Excel chart is to draw a line on top of the Excel Chart using shapes. Follow the steps on how to add a vertical line in Excel graph below:

STEP 1: Select the data that will be used to create a chart.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 2: Go to Insert > Line Charts > Line with Markers.Add an Interactive Vertical Column in Your Excel Line Chart

STEP 3: Go to Insert > Illustrations > Line.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 4: Draw the line on top of the Chart.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 5: To increase the weight of the vertical line, Go to Shape Format > Shape Outline > Weight > 3/4 pt.

Add an Interactive Vertical Column in Your Excel Line Chart

This will excel add vertical line to chart!

Add an Interactive Vertical Column in Your Excel Line Chart

Even though this method is super easy, it comes with its own drawback.

This line is not linked to the data and hence will not change when you change the data. So, you will have to adjust this line as and when you update the data.

 

Add Vertical Line using XY Scatter Plot

To highlight a point in your chart, you can clearly define its position on the x-axis and create a vertical line for that plot.

In this example, we will be using a scatter chart to highlight the period in the chart that has the maximum sales. Let’s see how it can be done:

STEP 1: Select the data that will be used to create a chart.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 2: Go to Insert > Line Charts > Line with Markers.Add an Interactive Vertical Column in Your Excel Line Chart

This is how your sales chart will look like:

Add an Interactive Vertical Column in Your Excel Line Chart

Now, insert the data for your vertical line highlighting the period that achieved the maximum sales.

STEP 3: In cells D6 and D7, use the formula below to extract the sales period with the maximum sales amount.

=MATCH(MAX(B5:B16),B5:B16,0)

Here, the MAX Formula will return the largest sales amount in the array provided and the MATCH Formula will return the relative position of the maximum value in the array.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 4: In cells E6 and E7, type the value 0 and 1 respectively.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 5: Click on the chart and then Go to Chart Design Tab > Select Data.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 6: In the Select Data Source dialog box, click on the Add button.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 7: In the Edit Series dialog box, select cell D4 for the Series name box and cells D6:D7 for the Series Values box. Click OK.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 8: Go to Chart Design > Change Chart Type.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 9: In the Change Chart Type dialog box, select Scatter with Straight Line and check the box for the secondary axis. Click OK.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 10: Again, Go to Chart Design> Select Data to open the Select Data dialog box. Select Period with Maximum Sales and then click on the Edit button.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 11: In the Edit Series dialog box, select cells D6 and D7 for X values and E6 and E7 for Y values. Click OK.

Add an Interactive Vertical Column in Your Excel Line Chart

You will a vertical line for the sales period 6 has been created but it does not extend to the top of the chart. Let’s change that and remove the secondary axis label as well!

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 12: Right-click on the secondary axis and select Format Axis.
Add an Interactive Vertical Column in Your Excel Line Chart

STEP 13: In the Format Axis dialog box, select the Maximum bound as 1 and the Label Position as None.

Add an Interactive Vertical Column in Your Excel Line Chart

Add an Interactive Vertical Column in Your Excel Line Chart

Your vertical column highlighting the maximum sales is now ready!

Add an Interactive Vertical Column in Your Excel Line Chart

This line is dynamic as well. In this updated sales data, the highest sales are now achieved in the sales period 2. The Line chart, as well as the vertical column, gets updated based on the new data.

Add an Interactive Vertical Column in Your Excel Line Chart

 

 

Add Vertical Line using Additional column series

The last method is to use an additional column for the vertical line. Let’s dive into a step-by-step tutorial on how to add vertical line in Excel graph:

STEP 1: Add a new column Vertical Line, and place in the first value as 100.

Add an Interactive Vertical Column in Your Excel Line Chart

 

STEP 2: Select the entire table, go to Insert > Line Charts > Line with Markers

Add an Interactive Vertical Column in Your Excel Line Chart

 

STEP 3: Select the chart and go to Design > Change Chart Type > Combo > Custom Combination

Add an Interactive Vertical Column in Your Excel Line Chart

 

STEP 4: For the Vertical Line series, change the Chart Type to Clustered Column and check Secondary Axis.  Press OK.

(This will transform the Vertical Line series into a vertical column in your chart.

Make sure the SALES PERIOD and SALES are Line with Markers Chart Types).

Add an Interactive Vertical Column in Your Excel Line Chart

 

STEP 5: Double click your Secondary Axis to view the Format Axis Panel.

Set Maximum to 100, to ensure our Vertical Line extends all the way to the top since we placed in the value of 100.

Add an Interactive Vertical Column in Your Excel Line Chart

Click on Labels and change the Label Position to None.

Add an Interactive Vertical Column in Your Excel Line Chart

 

STEP 6: Just to clean up our chart, notice there is a Sales Period Series.

Right click on it and click Delete.  We do not need this.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 7: Double click on the vertical bar, so that we can make it slimmer.

Add an Interactive Vertical Column in Your Excel Line Chart

In the Format Data Point pane, Set Gap Width to 500%. 

Add an Interactive Vertical Column in Your Excel Line Chart

 

STEP 8: Now it is time to try out our interactive chart!

Drag and drop the Vertical Line value of 100 into another Sales Period and see the column chart move!

Add an Interactive Vertical Column in Your Excel Line Chart

 

STEP 9: There is a cooler trick and we can make the Vertical Bar become Dynamic! For this we need the Developer Tab.

If you do not have the Developer Tab enabled yet, it is very easy to enable this first.  Go to File > Options

Add an Interactive Vertical Column in Your Excel Line Chart

Go to Customize Ribbon > Main Tabs > Developer.  Check this and click OK.

Add an Interactive Vertical Column in Your Excel Line Chart

 

STEP 10: Go to Developer > Insert > Form Controls > Scroll Bar. Drag this horizontally on top of the graph.

Add an Interactive Vertical Column in Your Excel Line Chart

 

STEP 11: Right click on the scroll bar and select Format Control.

Add an Interactive Vertical Column in Your Excel Line Chart

STEP 12: Set the Maximum Value to 12. This will depict our sales periods from 1 to 12.

For the Cell link, place in $D$5, this will show the value of the Scroll bar in this cell (i.e. which sales period it’s pointing to).  Press OK.

Add an Interactive Vertical Column in Your Excel Line Chart

 

STEP 12: In the Vertical Line column, place in this formula: =IF(A5=$D$5,100,””)

What this will do, is simply check if the Sales Period matches the value of the Scroll bar ($D$5).

If YES, then set the value to 100.

Setting the value to 100 will then make our vertical line show up in that Sales Period!

Now the pieces are almost all in place!

Add an Interactive Vertical Column in Your Excel Line Chart

 

STEP 13: Double click the lower right corner of the formula cell, which will copy the same formula down the entire column.

Add an Interactive Vertical Column in Your Excel Line Chart

 

Your interactive chart is now complete!!!

Try playing around with the scroll bar and see the Vertical Line move with it! Cool hey?

Add an Interactive Vertical Column in Your Excel Line Chart

Further Learning:

Make sure to download our FREE PDF on the 333 Excel keyboard Shortcuts here:

If you like this Excel tip, please share itEmail this to someone

email

Pin on Pinterest

Pinterest

Share on Facebook

Facebook

Tweet about this on Twitter

Twitter

Share on LinkedIn

Linkedin

Add an Interactive Vertical Column in Your Excel Line Chart | MyExcelOnline
Add an Interactive Vertical Column in Your Excel Line Chart | MyExcelOnline
Bryan

Bryan is a best-selling book author of the 101 Excel Series paperback books.

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!