How to Show Difference Between Two Series in Excel Bar Chart (2 Ways)

The sample dataset below contains a list of products including their selling prices with the cost prices of a company. For the two different series of selling prices and cost prices, we will show their differences with the help of a bar chart.

excel bar chart show difference between two series


Method 1 – Show Difference with Actual Values Between Two Series in Excel Bar Chart

Step 1: Using Formulas to Calculate Some Values for Bar Chart

➤ Add the following formula in cell E4.

=C4-D4

formulas for actual values with difference

➤ Press ENTER and drag down the Fill Handle tool.

formulas for actual values with difference

Result shows the differences between the selling prices and cost prices; the values within the brackets represent the negative values.

excel bar chart show difference between two series

➤ For determining the minimum value between the selling price and the cost price to get the base difference between them, insert the following formula.

=MIN(C4,D4)

formulas for actual values with difference

➤ Use the AutoFill feature.

formulas for actual values with difference

We will get the base differences between the selling prices and the cost prices.

excel bar chart show difference between two series

To separate the differences between the two prices according to their positive values and negative values.
➤ For extracting the positive values use the following formula in cell G4.

=IF(E4>0,E4,"")

When the value in cell E4 is positive, the IF function will return this positive value. If value is negative, the output cell will be blank.

formulas for actual values with difference

➤ Press ENTER and drag down the Fill Handle tool.

formulas for actual values with difference

This will result in the positive differences in the Positive column.

formulas for actual values with difference

➤ For extracting the negative values use the following formula in cell H4.

=IF(E4<0,ABS(E4),"")

E4 is the difference between the prices.

  • ABS(E4) → The ABS function will return the absolute value of the number in cell E4 neglecting its sign.
  • Output → 2327
  • IF(E4<0,ABS(E4),””) → becomes
  • IF(E4<0,2327,””) → IF will return 2327 when E4<0, otherwise a blank.
  • Output → Blank

excel bar chart show difference between two series

➤ Apply AutoFill.

formulas for actual values with difference

This results in the two negative values without their symbols in the Negative column.

formulas for actual values with difference


Step 2 – Plotting Differences in Bar Chart

We will now plot the differences between the prices with their actual values.

excel bar chart show difference between two series

➤ Select the columns ProductSelling Price and Cost Price first and then for the rest of the non-adjacent columns Base DifferencePositive and Negative select by pressing CTRL.
➤ Go to the Insert Tab >> All Chart Types Option.

plotting actual values with difference

The Insert Chart dialog box will pop up.
➤ Go to the All Charts Tab >> Bar >> Stacked Bar >> select your desired type of Stacked Bar chart >> press OK.

plotting actual values with difference

The bar chart will pop up.
➤ Select any series from the combination of the series of the stacked bar chart and then Right-Click.

plotting actual values with difference

➤ Choose the option Change Series Chart Type.

excel bar chart show difference between two series

The Change Chart Type wizard will open up.
➤ Change the Chart Type from Stacked Bar to Clustered Bar and check on the Secondary Axis option for the two series Selling Price and Cost Price.
➤ Press OK.

plotting actual values with difference

This results appears as shown in the bar chart.

plotting actual values with difference

Rename the chart title as Difference Between Selling Price and Cost Price.

excel bar chart show difference between two series

Read More: How to Make a Bar Graph Comparing Two Sets of Data in Excel


Method 2: – Show Difference Between Two Series with Percentage in Excel Bar Chart

percentage difference


Step 1 – Using Formulas to Calculate Some Values for Bar Chart

➤ Add the following formula in cell E4.

=C4-D4

➤ Apply AutoFill.

formulas for percentage difference

This results in the differences between the Selling Price values and Cost Price values.

formulas for percentage difference

➤ For extracting the positive values use the following formula in cell F4.

=IF(E4>0,E4,"")

➤ Drag down the Fill Handle tool.

excel bar chart show difference between two series

This results in the positive differences in the positive column.

excel bar chart show difference between two series

➤ For extracting the negative values use the following formula in cell G4.

=IF(E4<0,ABS(E4),"")
  • ABS(E4) → Here, the ABS function will return the absolute value of the number in cell E4 neglecting its sign.
  • Output → 2327
  • IF(E4<0,ABS(E4),””) → becomes
  • IF(E4<0,2327,””) → IF will return 2327, when E4<0 otherwise a blank.
  • Output → Blank

➤ Drag down the Fill Handle tool.

formulas for percentage difference

This results in the two negative values without their symbols in the Negative column.

formulas for percentage difference

➤ To gain the percentages of the differences with respect to the cost prices of the products apply the following formula in cell H4.

=E4/D4

➤ To gain the percentages for the rest cells use the AutoFill feature of Excel.

excel bar chart show difference between two series

This results in the percentage differences of the prices with respect to the cost prices.

formulas for percentage difference


Step 2 – Mapping Values with Error Bars in Bar Chart

➤ Select the columns Product, Selling Price, and Cost Price and then go to the Insert Tab >> All Chart Types Option.

excel bar chart show difference between two series

The Insert Chart dialog box will pop up.
➤ Go to the All Charts Tab >> Bar >> Clustered Bar >> select your desired type of Clustered Bar chart >> press OK.

plotting percentage differences

➤ Choose the Cost Price series of the chart and then click on the Chart Elements icon.

plotting percentage differences

The different options will appear.
➤ Click on the arrow symbol beside the Error Bars option and choose the option More Options.

excel bar chart show difference between two series

On the right pane, the Format Error Bars wizard will open up.
➤ Under the Horizontal Error Bar options, choose the Both option from Direction, and the Cap option from End Style.
➤ Click on the Custom option and then select the Specify Value option.

excel bar chart show difference between two series

The Custom Error Bars dialog box will pop up.

➤ Select the positive differences in the Positive Error Value box and then the negative differences in the Negative Error Value box.
➤ Press OK.

plotting percentage differences

This results in the error bars in the series of the cost prices.

excel bar chart show difference between two series


Step 3 – Modifying Data Labels

➤ Click on the Chart Elements option and then check the Data Labels option.

excel bar chart show difference between two series

➤ Select the data labels of the Cost Price series and then choose the Format Data Labels option.

modifying data labels

The Format Data Labels dialog box in the right pane opens up.
➤ Within the Label Options choose the Outside End option as the Label Position, check on the Show Leader Lines option, and the Value From Cells option.

excel bar chart show difference between two series

The Data Label Range dialog box will pop up.
➤ Choose the range of the percentages in the Select Data Label Range box and press OK.

excel bar chart show difference between two series

Select the data labels of the selling price series.

excel bar chart show difference between two series

➤ Uncheck the Value option.

modifying data labels

This results in the bar chart with the percentage differences between the prices.

modifying data labels

Name the chart title as Percentage Difference.

excel bar chart show difference between two series

Read More: How to Show Number and Percentage in Excel Bar Chart


Download Practice Workbook


Related Articles


<< Go Back to Excel Bar ChartExcel Charts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Tanjima Hossain
Tanjima Hossain

TANJIMA HOSSAIN is a marine engineer who enjoys working with Excel and VBA programming. For her, programming is a handy, time-saving tool for managing data, files, and online tasks. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. She holds a B.Sc. in Naval Architecture & Marine Engineering from BUET and is now a content developer. In this role, she creates tech-focused content centred around Excel and VBA. Apart from... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo