Jon Acampora

Author Archives: Jon Acampora

Welcome to Excel Campus! I am excited you are here. My name is Jon and my goal is to help you learn Excel to save time with your job and advance in your career. I've been an avid Excel user and VBA developer for 10+ years. I am also a Microsoft MVP. I try to learn something new everyday, and want to share this knowledge with you to help you improve your skills. When I'm not looking at spreadsheets, I get outdoors and surf. :) more about me


Quarter Sum Formulas Add-in

This post provides a solution for quickly creating formulas to sum monthly data into quarters and full year totals using a free add-in.

The Problem

When using the SUM function to sum monthly data into quarterly totals, you can NOT create the formula for the 1st quarter and then copy/drag the formula to the right.  

Quarter Formulas Incorrect with Drag Right

Click to Enlarge

The cell references will only move one column to the right instead of three columns.  If we copy the formula above for Q1 to the right, the resulting formula will give us the total for Feb-Apr.  The correct formula should be a total for Apr-Jun.

The Solution

The Quarter Formulas Add-in creates the correct formulas for the quarters and full year in just a few clicks.  And it’s FREE!

 Excel Quarter Formulas Demo

And it Gets FASTER!

You can add the Quarter Formulas button to the Quick Access Toolbar to launch it with a keyboard shortcut.  Then you will be creating all the formulas in under 2 seconds!

Quarter Formulas Button Keyboard Shortcut Demo

These articles will explain how to setup the Quick Access Toolbar (QAT) and use the QAT for keyboard shortcuts.


  • Four quarter and full year SUM formulas created in 2 seconds.
  • No typing or complex formulas needed.
  • Creates easy-to-read SUM formulas.
  • Automatically determines 1st month cell when Q1 cell is selected.

Download (758.5 KB)

The add-in file and installation guide are included in the zip file.  The add-in is compatible with Excel 2007, 2010, 2013.  Please let me know if you are interested in a version compatible with Excel 2003.

Subscribe to our email newsletter below to stay updated with changes.

Related Help Articles

Instruction Guide

This add-in will save you lots of time when creating quarter and full year formulas, and it is very easy to use.

See the guide on how to install an add-in (included with download).  After the add-in is installed, you will see the Formula Tools menu on the Add-ins tab of the ribbon.

Quarter Formulas Ribbon Screenshot

The Formula Tools button is a drop-down menu that includes a button for the Quarter Formulas function.  More functions will be added to this menu in the future.  See below for instructions on how to setup a keyboard shortcut to launch the function.

Report Structure Requirements

The Quarter Formulas add-in requires all the month data be in 12 consecutive columns.  The four quarter and year total formulas will be created in five consecutive columns.  You will choose the starting cell (Q1) that the formulas will be created in.  The created formulas do NOT have to be next to the monthly data.

Quarter Formulas Report Structure Requirements

Creating the Formulas

  1. Click the Quarter Formulas Button.
  2. Select the 1st Quarter cell where you want the formulas to be created and click OK.
    – Formulas for Q2-Q4 and Full Year sum will be created to the right of this cell.
    – The selection defaults to the active (selected) cell in the worksheet.  Selecting the Q1 cell prior to clicking the Quarter Formulas button will save you a step.
  3. Select the cell that contains month 1 data and click OK.
    – This is the 1st month in the 1st quarter (January if you are on a calendar year).
    – The selection defaults to 12 cells to the left of the Q1 cell selected in the previous step.  If the quarterly total cells are directly to the right of the monthly data then you will not have to select the month 1 cell.  This will save you another step.
  4. The SUM formulas will be created in the Q1 cell and the four cells to the right of it.  
    – Copy the formulas down to fill all the rows in your report.

What do you think?

Please leave a comment with any questions or suggestions.


Keyboard Shortcuts to Change Font & Fill Color or Cell Style

Excel Font Fill Color Keyboard Shortcut KeysHave you been searching Google to find keyboard shortcuts to apply a font or fill color to a cell?

Well, you can stop your search… 🙂

I have spent a lot of time researching this topic as well.  This page will hopefully help you with some answers and solutions to this question.

No “Good” Built-in Shortcuts

Unfortunately, there are no built-in keyboard shortcuts in Excel for font or fill colors.  There are a few “workaround” methods that I explain in another blog post, 5 Excel Keyboard Shortcuts for Font & Fill Colors.  But these built-in methods are either slow, or do not provide a direct solution.

Keyboard Shortcuts for Font & Fill Colors

So I developed an add-in that allows you to create keyboard shortcuts to change the font & fill colors.  This add-in also lets you create keyboard shortcuts to apply other cell formatting properties like number formatting, borders, font size, protection alignment, etc.

Formatting Shortcuts Lite Excel Userform

The add-in is named “Formatting Shortcuts” and there is a free version available for download.

Click Here to Jump to Download Section

Time Saving Shortcuts

The Formatting Shortcuts add-in will save you a lot of time if you are currently using the mouse to format cells.  Again, this includes any type of formatting and is not just limited to font and fill colors.

The image below shows some common tasks that we all do in Excel to format cells.  It includes the buttons on the ribbon that we press over and over again to apply formatting._

Common Formatting Mouse Actions - Excel

The Formatting Shortcuts add-in will allow you to create keyboard shortcuts for any of these actions.

The keyboard shortcuts are quick and easy to press in one step.  This will save you a ton of time over having to navigate to the ribbon (toolbar) with the mouse.

Video Demo

Here is a video that explains how the add-in works.  You will see that it is fast to setup and easy to press the shortcut keys.

Click Here to Jump to Download Section

In the video above I demonstrate a few different ways to apply different formatting types with the custom keyboard shortcuts.

Keyboard Shortcuts Are EASY to Press

The keyboard shortcuts you create all start with Ctrl+Shift.  Then you get to choose the letter at the end of the key combination.

For example, in the screenshot below I have setup the shortcut Ctrl+Shift+S to apply the yellow fill color to a cell or range.

Formatting Shortcuts Lite Excel Userform

The shortcut Ctrl+Shift+S is very easy to press because the keys are close together and can all be pressed at one time with your left hand.

Keyboard Shortcut Diagram Ctrl+Shift+S Yellow Fill

This beats alternative methods of having to press Alt+H+H, then pressing the arrow keys to find the color on the palette.  That method is slow and difficult to perform.

But the Ctrl+Shift+{letter} shortcuts you use with the Formatting Shortcuts add-in are easy and efficient.  They will save you a lot of time.

Click Here to Jump to Download Section

Undo Your Mistakes

The Formatting Shortcuts add-in also allows you to undo your mistakes.  If you have ever recorded your own macro and assigned a shortcut key to it, you know that you lose the undo history when you press the shortcut key to run the macro.

This is not the case with the add-in.  The full version of the Formatting Shortcuts add-in allows you to retain the full Undo History in Excel.  So you can use Ctrl+Z or the Undo button if you accidentally press one of the shortcut keys.

The screencast below shows an example of this.  In this video I setup a shortcut key for a cell style that contains number formatting, borders, font, and fill colors.  I then use the keyboard shortcut Ctrl+Shift+A to apply the formatting to a few cells. Finally, I undo my actions using the Undo button.


Formatting Shortcuts Add-in Setup Demo

Click Here to Jump to Download Section


Here are a few additional features of the add-in:

  1. Easy to Use – The shortcut keys and cell formatting can be changed with the click of a few buttons.
  2. Unlimited Options – Any combination of formatting properties can be applied with a keyboard shortcut.  This includes custom styles and all formatting options.
  3. Full Undo History – The undo history is retained so you can undo any changes made by the keyboard shortcuts.  If you have recorded or written your own formatting macros, you know that undo history is typically lost when you run a macro.  This add-in works around that to retain the undo history.  More details about undo on the help page.
  4. Save Time – Improve your efficiency and style worksheets in a fraction of the time it would take with mouse actions.
  5. Consistency – The add-in saves your styles so you can start using the keyboard shortcuts when you open a new workbook.  No setup needed (even for custom styles).  Using the same styles throughout your models will make it easier for users to read and understand.  Read more about styles on the help page._

Click Here to Jump to Download Section

Formatting Types

  1. Font Color – Applies the font color to the selected cell(s).
  2. Fill Color – Applies the fill color (cell shading or background) to the selected cell(s).
  3. Font+Fill Color – Applies both the font and fill color to the selected cell(s).
  4. Cell Styles (full version only) – Applies the cell style to the selected cell(s).  Formatting for cell styles include:
    – font color
    – fill color
    – text formatting (bold, italics, underline, etc.)
    – border properties (color, weight, line style, etc.)
    – alignment (left, right, centered, etc.)
    – cell protection
    – The image below shows the Cell Styles menu.  Cell styles can be added and modified (customized) in Excel.

    Excel Cells Styles Menu

    Click to Enlarge

    Click Here to Jump to Download Section


The add-in is available in two versions.  Both versions are compatible with Excel 2007, 2010, and 2013.

Lite Version

The lite version is free to download below and allows you to create up to three keyboard shortcuts for font color, fill color (cell background), or both font & fill color.  It has a single undo feature, which allows you to undo your keyboard shortcut action one time.

Formatting Shortcuts Lite Ribbon Button Userform


Click Here to Jump to Download Section

Full Version

The full version is $14.99 US and allows you to create  12 keyboard shortcuts.  

It includes the addition of the cell styles format type to create shortcuts for all cell properties (number formatting, borders, font, alignment, etc.)

It also includes the ability to preserve the full undo history.  This means you can undo any of the formatting you applied with the keyboard shortcuts using the Undo button or Ctrl+Z.  The Cell Styles and Undo History are two great features that I think you will find really useful.

Formatting Shortcuts Excel Userform 2.4


The full version also includes a Key List feature.  Clicking the Key List button will create a new workbook with a list of all your shortcut keys.  You can print this list and use it as a reference to learn and memorize your shortcuts.

Formatting Shortcuts Key List

The full version includes a full money-back guarantee.  If you are not satisfied, you may get a full refund within 90 days of purchase.

Both versions include free upgrades and support.

Product Comparison

Formatting Shortcuts Product Comparisons 2.4


Lite Version – FREE
Full Version – $14.99 US

Add to Cart

After purchase you will be redirected to a secure download page.  You will also receive an email with a link to download the zip file.

Compatible with: Excel 2007, 2010, 2013, 2016 for Windows Only

All purchases are backed by our 100% Money-back Guarantee.

What’s in the Zip?

The zip file contains: the add-in file, installation guide, and user guide.

Formatting Shortcuts Zip File Contents

Online Help Pages

How to Install an Excel Add-in Guide

Formatting Shortcuts Add-in Help Page

What do you think?

I want you to love this add-in, so please leave a comment on how it works for you or how it can be improved.


How to Install an Excel Add-in – Guide

What’s an Excel Add-in File?

An add-in file is an Excel file that contains macros (code) and has the extension “.xla” or “.xlam” (2007 and later). When opened, the worksheets in the file are hidden and the macros are typically accessed through buttons that are added to the toolbar or ribbon. Once installed, an add-in will automatically open every time Excel is opened.


Here is a video that walks through how to install the add-in.

Please see my video below on how to add the add-in’s folder location to the Trusted Locations list.  This is now a critical step due to a July 2016 Office Security update.

Installing the add-in is pretty easy, and should only take a few minutes.

  1. Save the add-in file to your computer.
    – Pick any folder on your hard drive that is easy for you to find.
    – My suggestion is to create a folder named “Excel Campus” and place it in your Documents folder.
  2. Open Excel and go to the Options Menu.
    – This varies depending on your version of excel.
    – 2007 – Office Button > Excel Options
    – 2010 & 2013 – File > OptionsExcel Options Menus 2007 2010 2013 2016
  3. Click the “Add-Ins” option on the left-side menu, and then click the “Go…” button.
    – You may have to wait a few seconds for the window to appear.Excel Options Add-Ins Menu
  4. Click the “Browse…” button on the Add-Ins Menu.Browse for Excel Add-ins
  5. Locate the add-in file you saved in Step 1, and click OK.Select Excel Add-in File
  6. The Add-in will appear in the list and should be enabled, click OK.Enable Excel Add-in
  7. Installation Complete (almost) – The add-in is now installed.  However, there is now an additional step due to an Office Security Update in July 2016. Please see the section below for instructions.

Trust the File Location

Important Note: There is one additional step to this installation due to an Office Security Update released in July 2016.  Here is a video that explains it in more detail.

The folder that the add-in file is saved in needs to be added as a Trusted Location in Excel.  The instructions on how to trust the folder location are below.  I also have an article and video that describes this issue in more detail.

  1. Open the Excel Options menu
    1. File > Options
      Excel Options Menus 2007 2010 2013 2016
  2. Open the Trust Center menu and Add a new location
    1. 1. Trust Center > 2. Trust Center Settings… > 3. Trusted Locations > 4. Add new location.
      Add New Trusted Location Folder in Excel
  3. Browse for the folder that you saved the add-in file in.
    Add Trusted Location Folder
  4. Press OK, the folder should now appear in the Trusted Locations list.
    Trusted Location Added for Documents Folder
  5. Press OK on the Trust Center and Excel Options menu to close the menus.
  6. The add-in is now in a trusted location and the XL Campus tab will appear every time you open Excel.

Unblock the File

Some users still have issues with the add-in’s ribbon disappearing after trusting the folder location.  If this happens to you, you will need to Unblock the file by changing a file property.

  1. Locate the Add-in file (.xla, .xlam) in Windows Explorer.
  2. Right-click the file and select Properties.
  3. At the bottom of the General tab you should see a Security section.  Check the box that says Unblock.
    Security Unblock Property for Excel Add-in - Ribbon Disappears
  4. Press the OK button.
  5. Close Excel completely and re-open it.  The add-in should now load and any custom ribbons will appear.

You will only need to do this unblock one time.  However, if you download an updated version of the file then you will have to repeat the steps above to unblock it.

Hopefully these additional security steps will be fixed in a future update to Office.  If you completed all the steps above then you should see the add-ins ribbon tab load every time you open Excel.

Download PDF

Installing An Excel Add-in - Guide (672.2 KB)


Paste Buddy – Create custom keyboard shortcuts for the paste special commands like paste values.

Formatting Shortcuts Add-in – Keyboard shortcuts to change font & fill color and cell styles.

More Add-ins


Move Excel Charts with Arrow Keys

This post and video contain lots of tips for moving your charts and shapes with the arrow keys.  This is very useful when you need to arrange and align multiple shapes on your worksheet.  I also have a free Chart Alignment add-in that allows you to move the objects inside a chart (titles, labels, legends) with the arrow keys and alignment buttons.


Move Chart with Arrow Keys

Typically when you select a chart with your mouse, the box surrounding the chart looks like the following.

Chart Single Click No Arrow Keys

When the chart is selected like this, nothing happens when you press the arrow keys to try and move the chart around the worksheet.  Instead, the objects within the chart are cycled through and selected.  Not what we want.

Solution #1

Hold Ctrl and Left Click the chart –  This selects the shape object that the chart resides in.  Circles will appear on each corner of the chart.

Chart Bounding Box Ctrl Click

The chart can now be moved around on the sheet with the arrow keys, making it easy to align it with other shapes, charts, or cells in your worksheet.

Solution #2

Select multiple charts or shapes – Hold the Ctrl key and select at least two charts using left click.  The bounding box will still look like the same as when you only have one chart selected, but you are able to move the charts with the arrow keys.

Select Multiple Charts

Move or Create a Shape Inside a Chart

Moving shapes inside a chart can get a bit confusing.  Shapes, such as a text box or rectangle, can reside in two places:

  • either inside the chart object,
  • or on the worksheet (outside of the chart).

The confusing part is that a shape residing outside the chart on the worksheet can be placed on top of the chart.  This makes it look like the shape is inside the chart even though it is not.  In this case, when you move the chart, the shape will NOT move with it unless you have both the shape and the chart selected.

A shape located inside the chart will move with the chart.  This makes it easier to move and align the chart because you don’t have to worry about selecting multiple objects when doing the alignment.

There are two ways to get a shape inside a chart:

  1. Create the shape inside the chart – First select the chart so the bounding box appears around it, then draw the shape inside the chart object area (Insert tab
    > Shapes menu).
  2. Paste a shape inside the chart – Cut or Copy an existing shape on your worksheet, then select the chart and paste the shape.  This will put the shape inside the chart.

Move Shape Inside Chart with Arrow Keys

Now that your shape is residing inside your chart, you can use the arrow keys to move it around and align it with the other objects in your chart (title, axis, legend, etc.)  See instructions below the screencast.

Move Shape Inside Chart with Arrow Keys

To move a shape inside the chart with arrow keys:

  1. Ctrl+Left Click the border of the chart so you get the circles on the corners.
    Ctrl Select Chart with Shape
  2. Then Ctrl+Left Click the shape inside the chart.  You will notice that the circles remain on the top left corner of the chart.
    Ctrl Select Shape Inside Chart
  3. Keyboard arrows are now enabled so you can move and align your shape (text box) within the chart.


You should now be able to get all your charts and shapes lined up to perfection using the incremental movements of the arrow keys.  This is very useful if you read my post on Panel Charts as an alternative to Stacked Charts and want to create panel charts.  In a future post I will share more tips and shortcuts for aligning and viewing your charts.

What are some shortcuts you use to align your charts?


Stacked Column Bar Chart Alternatives – Find the Missing Trends

Stacked bar or column charts are used a lot by the media and corporate world.  I believe they are popular because they display a lot of information in one chart, and are relatively easy to create in Excel.  However, I’m not a big fan.  I’m going to explain why I consider them to be “bad charts”, and present some alternatives.

Stacked Column Chart - BAD CHART

Bad Charts

I consider the stacked column chart above to be a “bad chart” because it doesn’t do a good job of displaying the trends in the data.  There are a total of six data series displayed here; the five regions plus the total.  But we are really only able to see trends in two of the six series.  We can see trends in the North America and Total (height of entire column) series because the baseline for these series is flat.  The baseline is basically the x-axis at $0.  This is very important when creating a chart that is displaying a trend.  Our eye is able to distinguish the baseline as the starting point for each column, and then compare the top point of each column moving from left to right.  This works great for the North America and Total series, but it is very difficult to see the trends for the other four regions.

Stacked Column Chart - Baseline Example

Uneven Baseline

Stacked Column Chart - Uneven Baseline Example

The image above shows the difficulty in quickly seeing the trend in sales for Asia because the baseline is uneven.  I emphasize “quickly” because we want our chart to clearly and easily communicate a story or trend.  It would probably be easier to just look at the actual numbers to see a trend versus trying to determine if the bars are increasing or decreasing in size over time.  And these bars for Asia get hidden when you consider all the other regions that are also stacked above and below it.  It’s an absolute mess! 🙂

Here is a line chart that shows the actual trend for Asia.  It’s much easier to quickly see that sales are declining over the last three quarters of the year.  This would probably draw attention to the performance of the region, and spark some action to be taken to correct the problem.

Asia Line Chart

When to Use Stacked Charts

Stacked charts can work if there are drastic changes in your data over time, and you want to only display the trend of one or possibly two series.  It’s best to highlight these series in a color that stands out, and add some text to describe the trend.  You also want to move the series to the bottom of the chart so it sits on the baseline, making it easy for the reader to see the trend.

Acceptable Stacked Column Chart

Alternative 2 below also makes use of the stacked chart by giving it a dynamic baseline to quickly analyze trends.


Now that we have an understanding of when NOT to use stacked charts, we can start thinking about alternative methods that clearly and quickly tell the story.  The use of these will depend on what trends you find in your data, and how you want to convey the message.

Alternative #1: Panel Charts

Panel charts are a group of small charts organized together in a panel.  This is a good way to break out each region into its own chart.

Panel Chart - Alternative 1

Now we can start to see trends within each region.  These trends are not possible to see in the stacked chart because of the uneven baselines, and scale of the chart.  Sales in North America and Europe are much greater than Asia and Africa, so the trends get lost.  There are some important trends getting lost if you don’t look at them closely.  You can highlight those trends in a panel chart as I did above.  We can see that sales in Asia are declining, while sales in Africa have almost doubled over the year.  The dollars are small compared to total sales, but there might be great opportunities being missed if this is only analyzed in a stacked chart.

If you really want to impress your boss, you could add zoom buttons to each panel using the Zoom on Charts Macro (available for free download).  This is a great feature to add to an interactive dashboard.

Zoom on Panel Charts

Alternative #2: Dynamic Baseline Stacked Column or Bar Chart

You might like this solution if you want to keep the stacked chart, or don’t want to freak out your audience with something drastically different than they are used to seeing.  I call this one the dynamic baseline stack chart because it allows you to quickly choose the series to display at the bottom using a drop-down menu.  It is pretty easy to implement.  NO macros or VBA are required.  Just two different formulas and a drop-down form control.  The workbook that contains the form is available for free download below.  Instructions on how to create this chart are included in the file.

Dynamic Stacked Chart - Alternative 2 GIF

When the West region is at the top of the column stack it is difficult to see any trends.  But when the West is moved to the baseline (bottom) series, we see that there is a steady decline in the last half of the year.

There are also some correlating trends between South and West in the second half of the year.  This is easier to see when we move East to the top of the stack.  This might be another way to present your data depending on the message you want to convey to the readers.

Dynamic Baseline - West Example

Alternative #3: ???

I’d love to hear about some alternatives from you.  Make it as simple or complex as you like, there’s no right or wrong answer.  Just remember that the goal is to clearly and quickly tell the story to the reader.



Dynamic Baseline Stacked Column Chart.xls (130.6 KB)

Additional Resources

If you’re looking to learn more about charting, I highly recommend the dashboard course from My Online Training Hub.  I have taken this course and it really helped me improve my charting skills.  Checkout my video review of the course to learn more about it.


Comparative Distribution Chart – Histogram or Box Plot Alternative

It can be difficult to create visualizations that compare one segment against an entire population of data while displaying the distribution of the entire population.  In this post I’m going to explain how to create the following chart in Excel.  

Comparative Distribution XY Scatter Chart

In this case we want to see pricing distribution for several products by customer segment.  So the data values are average price, and the categories are the products and customer segments.  But this same technique could be used for any combination of data value and categories; sales by product and region, headcount by department and country, etc.

The Challenge

I was recently doing analysis on product pricing data and the goal was to determine how one customer segment was performing against all the rest.  How does the the average price of each product in Segment 1 compare to the rest?  Like all good charting or data visualization projects, it took many iterations to come up with a chart that clearly communicated the story without too much explanation.  

Alternative 1: Box Plot or Quartile Plot

I first started with the box plot or quartile plot.  This is a great way to see the distribution of your data and compare it to other segments or categories.  The major issue I had with the box plot is that not everyone understands it.  So the use of a box plot depends on your audience.  If the audience is familiar then it is a great solution.  However, trying to explain it can be time consuming and not worth the effort.

Box Plot or Quartile Plot Product Comparison

Box plots also work well if you have a large number of segments/categories.  In the comparative distribution chart we are only looking at 5 different customer segments.  If you had hundreds or thousands of segments, then the box plot is probably a better solution.  I will explain how I created it in a separate post.  If you want a hint, it’s actually a line chart turned on its side.

Alternative 2: Histograms

Histograms are a good alternative for a single category, but comparing multiple categories doesn’t really work.  You could combine several histograms into a panel chart, but it is hard to identify trends between categories.

Histogram Panel Chart

How to Create the Comparative Distribution Chart


There are two files you can download below that will help guide you through creating this type of chart.  

  • The “Comparative Distribution Chart Guide.xls” file contains a detailed step-by-step guide.  
  • The “Comparative Distribution XY Chart.crtx” file is a Chart Template file that you can use to change the chart type to resemble the comparative distribution chart.  This will save you a lot of time in formatting the chart.

Step 1 

Your original data should look similar to the format below, with products in each row and columns for each segment.  Using a pivot table to summarize your raw data would be an easy way to get the data in this format.  

Comparative Distribution - Original Data

Once you have the data table, then you need to add a few columns that will be used to plot the points in the XY Scatter chart.  I’ve added cell notes in the guide file that give more detail on the calculations in each column. Comparative Distribution - Range Bar Table

Step 2

Create the XY Scatter chart and add all the data series.  It’s best to select a blank cell and then insert the “Scatter with Only Markers” chart type.  Then add each data series individually.  Excel has a tough time trying to automatically figure out the X and Y values for each series if you try to select the whole table and create the chart.  So it’s best to add each series one-by-one.

Comparative Distribution Chart - Step 2

Note: You can skip steps 3 and 4 below by applying the Comparative Distribution XY Chart template.  This will automatically do all the formatting for you.

Step 3

Now that you have all the series plotted on the chart, you need to format the marker options and line colors/styles for each series.  You’ll want each series to have the same marker style and color except for the series you are comparing.  In this case we want Segment 1 to have blue circle markers, and all other segments to be gray.  The Range Bar series is the light gray background bar that shows the range from min to max for each product.  For this series, set the markers to None, and change the line style width to 8.5pt.  This will create a thick line in the background.  You may also have to rearrange the order of your series if the background bar is on top of the other points.

Comparative Distribution Chart - Step 3

Step 4

The chart axes need to be changed so the data points are plotted between the horizontal grid lines.  The vertical axis needs to be changed by starting the minimum axis at 0.5 and changing the major unit to 1.0 on the vertical axis.

You can also change the major units on the horizontal axis to reduce the clutter.  We really only need to see the min and max values and maybe a few points in between to give some scale to the chart.

Comparative Distribution Chart - Step 4

Step 5

Add labels for the product and Segment 1 price.  The fastest and easiest way to do this is by using the XY Chart Labels add-in.  It’s available for free download and very easy to use.

XY Chart Labeler - Add Labels

Step 6

Finally, put some finishing touches on your chart to make it look presentable.  Tuck in its shirt and comb its hair. 🙂  And basically remove all the unnecessary chart junk that is not needed to tell the story.  We are trying to clearly show how Segment 1 compares to the other segments across all product lines.  

Comparative Distribution Chart - Step 6

Pros and Cons


The comparative distribution chart combines a little bit of both the box plot and simple histogram.  With the added bonuses of being easy to explain, and allowing for comparison of one data point against the whole data set.  It’s use will depend what trends or messages the chart clearly conveys to the reader.  In this case the Segment 1 prices are lower than the others for almost every product.  That would be a clear indication that Segment 1 has some defining characteristics that create this behavior.  Possibly, Segment 1 customers always use coupons that other segments don’t have access to.  


This chart is best for small number of segments.  If we had 50 customer segments instead of 5, then it would be difficult to see the distribution of all the data points in the range for each product.  A box plot would be better suited for this.


Comparative Distribution Chart Guide.xls (233.0 KB)

Comparative Distribution XY Chart Template.crtx (5.5 KB)

This model could be further enhanced by adding a drop-down to select the segment you want to compare to the others.  I’m sure you will find many possibilities for modifying it.

Please let me know if you have any questions.  I’d like to hear how you could use this or improve on it.  Thanks!


Excel Formula to Calculate Commissions with Tiered Rate Structure

In this post I will explain how to calculate a dollar or percentage commission payout in one cell using the SUMPRODUCT function.  Calculating commissions on a tiered rate structure can be difficult because you are trying to determine the cumulative payout based on different rates at each tier, and the achievement amount might fall in between one of the tier ranges.

If your commission plan tiers are not cumulative, then you might want to checkout my article on how to calculate commissions with VLOOKUP.  This is a simpler calculation then the one presented below.

Tiered Rate Table

The following is an example of a tiered rate table for sales commissions.  The first column contains the tiered ranges of Quota Attainment and the second column contains the Payout % for each tier.  If the sales person (rep) achieves sales that are at the top end of each tier, then they will receive the full payout amount in the Total Payout column.  For example, if the rep sells 40% of their quota then they will receive 20% of their commission.  If they sell 60% of quota, they will receive 35%, and so on down the table.

Tiered Rate Structure Table - Basic

The difficult part is when the attainment amount falls in between the ranges.  What if the rep sells 50% of his/her quota?  The rep would receive 20% payout for the first 40% of quota, and an additional 7.5% payout for the last 10% of quota.  The last 10% of quota attainment is calculated by finding the payout rate at each tier.  So the total payout on 50% of quota would be 27.5%.

Typically we would have to calculate the payout at every tier and then sum the payout amounts to get the total amount.  Or we could use some complicated IF statement to determine the payout all in one formula.  But there is an easier way…

The Solution

You can download the sample workbook below to follow along.

The SUMPRODUCT function can be used to calculate the entire payout.  First we have to calculate the differential payout rate for each tier.  The differential rate is the difference between the payout rates at each tier.

The payout rate at each tier is the total percentage of payout in the tier, divided by the total percent of attainment possible in the tier.  This is basically the amount paid for each percentage increase in attainment in each tier.  In the image below the Payout Rate for the 0%-40% range is 0.50.  This means that for every 1% attained, the payout will be 0.50 of the 20% total payout.

Payout Rate =([tier attainment max] – [tier attainment min]) / ([payout % this tier] – [payout % previous tier])

Tiered Rate Structure Table - Payout Rate Formula

Rate Curve

The payout rate is also known as the rate curve.  The rate curve is displayed below, and you can think of the payout rate as the slope of the curve at each tier.

Tiered Rate Structure Table - Rate Curve

Differential Rate

The differential rate is calculated by taking the difference between the payout rate in the current tier and the payout rate in the previous tier.

Differential Rate = [payout rate Current tier] – [payout rate Previous tier]

Tiered Rate Structure Table - Differential Rate Formula

This is used in the cumulative calculation of the payout percentage.  As the attainment moves up into multiple tiers, the amount of attainment left in each tier is multiplied by the differential rate.  The sum of all these is the total payout.


The SUMPRODUCT formula for Total Payout is:

=SUMPRODUCT( (Attainment > [Tier Min]) * (Attainment –  [Tier Min]) * [Differential Rate] )

Variables in brackets [] refer to entire column in rate table.

Tiered Rate Structure Table - SUMPRODUCT Formula

The following splits the SUMPRODUCT formula into multiple columns and rows for a clearer visual of how the formula is calculating the total payout.

  1. Attain > Tier Min: Returns a “1” if the attainment is greater than the attainment tier minimum.  If attainment is 90%, then the condition is true for the first 4 rows and a value of 1 is returned.
  2. Attain – Tier Min: Finds the difference between the total attainment and attainment tier minimum. This is necessary because we are multiplying it by the differential rate.  So in the first row we are taking the entire attainment of 90% and multiplying it by the diff rate of 50%.  Each subsequent row is taking the leftover attainment for its tier range, and multiplying it by the payout rate that is leftover for its tier (the diff rate).
  3. Diff Rate: The differential rate for each tier.
  4. Product: Column 1 * Column 2 * Column 3
  5. Sumproduct: Sum of the Product column.  The total payout on 90% attainment is 87.5%

Tiered Rate Structure Table - SUMPRODUCT Explained

SUMPRODUCT Visualization

The following is a visual example of the Product column plotted on the rate curve.  Sometimes it is easier to understand when you see it visually.  The SUMPRODUCT formula finds the total payout in each tier based on the remaining balance of attainment multiplied by the payout rate in that tier.  This is basically a continuation of the rate curve at each tier to the total attainment of 90%.  In the chart below you can see that the dark grey lines follow the rate curve at each tier and then continue on the same curve to the 90% attainment (green) line.

Tiered Rate Structure Table - Product Point Rate Curve

  1. For the first tier it is (90%-0%) * (50%-0%) = 45%.  50% is the payout rate for tier 1, and 90% is the total attainment.
  2. The second tier is (90%-40%) * (75%-50%)  = 12.5%.  The 90%-40% is the remaining balance of attainment for tier 2, which is 50%.  45% (tier 1) + 12.5% (tier 2) = 57.5%
  3. Tier 3 is (90%-60%) * (200%-75%) = 37.5%.  The sum of the first three tiers is 95% (45%+12.5%+37.5%), which is higher than the actual payout of 87.5%.
  4. Tier 4 is (90%-80%) * (125%-200%) = -7.5%.  The negative product is a result of the payout rate being less in tier 4 than tier 3.  Or, the slope of the rate curve is flatter in tier 4 than tier 3.  That brings the total payout back down to 87.5%.

Negative Differential

This negative differential rate in tier 4 is important to note.  Not only does it make for a confusing calculation, it also tells you that the rate of compensation is not as great in tier 4.  For each additional percentage point of attainment, the sales rep is compensated at a lower rate than tier 3.  This might mean that there is more emphasis for the rep to attain sales on their quota in tier 3.  And the monetary motivation is not as great for attainment in tier 4.

Negative differential can also mean that the rate curve is poorly designed.  If the goal is to achieve 100% attainment of quota, then it is probably best to increase the payout rate (rate curve slope) in each tier up to 100%.  This design would give the rep more motivation (higher payout rate) as he/she gets closer to achieving their goal of 100% attainment.

Apply Formula to a List

Now that we are able to calculate the payout in one cell using one SUMPRODUCT formula, we can apply the formula to a whole list of employees in a table.  See the Total Payout % column  on Sales Table tab of the example file.  This is the major benefit of this formula.  The entire calculation can be handled in one cell and it is easily transferable to other models.  There are no hard-coded variables in your formula, or ugly IF statements.


Tiered Commission Rates using SUMPRODUCT.xls (101.4 KB)

Here is a file that uses whole number (units or dollars) for the tiers and payouts, instead of percentages.

Commission Plan SUMPRODUCT Units Dollars.xlsx (10.6 KB)

Here is an alternate solution submitted by Matthew Burgos using VLOOKUP instead of SUMPRODUCT.  He explains the formula in detail in the comment below.

Tiered Commission Rates Using VLOOKUP.xlsx (12.1 KB)

Still Confused? 🙂

I was too the first time I learned this technique.  It’s definitely complex.  I’d recommend reviewing it a few times with sample workbook and then try to implement it in your own model.

I have another article on how to calculate commissions with VLOOKUP that is an easier calculation for a simple commission plan.

Please leave a comment below with any questions/comments about this technique.


Absolute Structured References in Excel Table Formulas

This post will explain a trick for creating absolute structured references in Excel Table formulas.

Structured Reference Tables are great for creating clean, easy to read formulas.  But creating absolute references to the columns (aka anchoring the columns) in the formula is a bit tricky.

Quick Guide

Duplicate the column references as if referring to multiple columns.  Absolute references to:

  • One column in the same or other table: table1[[column1]:[column1]]
  • One cell in the same row as the formula: table1[@[column1]:[column1]]
  • Table names must be used even if the reference and formula cell are in the same table.
  • You must drag these formulas across columns to maintain the absolute reference (copy & paste does not work).

I have developed an add-in allows you to use the F4 key on the keyboard to create absolute/relative references.  You can download the Absolute Reference Add-in here.

Video Tutorial

Continue reading


Convert Text to Numbers – Excel Keyboard Shortcuts

Excel has a built-in feature to convert text to numbers, but it can be tricky to use when you are trying to select a long list of cells or multiple rows and columns.  In the video below I describe how to use keyboard shortcuts to accomplish this very quickly.

Keyboard Shortcuts to Convert Text to Numbers

Here’s a quick guide for the keyboard shortcuts to select the range of cells you want to convert.

  1. Select any cell that contains the Number Stored as Text error.  You will see a small green triangle in the top left corner of the cell.Number Stored as Text Error
  2. Use the following keyboard shortcuts to select the range:
    Ctrl + A – selects the entire contiguous range
    Ctrl + A Twice – selects the entire sheet
    Ctrl + Space bar – selects the entire column
    Shift + Left/Right Arrow – selects multiple columns
    Shift + Space bar – selects the entire rowShift + Up/Down Arrow – selects multiple rows
  3. The error menu drop-down will now be at the top left or right corner of your selected range.  You can then use the following keyboard shortcut to Convert to Numbers.
    Alt + Menu Key + C – Convert to Number

Excel Convert Text to Number Keyboard Shortcut Alt+Menu Key+C_

The Menu Key is located between the Alt and Ctrl keys on the right side of the keyboard.  If your keyboard does not have a menu key, you can use Shift +F10 as an alternate.


Keyboard Diagram Menu Key Windows_

Alternative Methods

I find the built-in feature to be the fastest, but there are other ways to accomplish this task:

    • Copy a cell containing a 1 and Paste Special>Multiple on the range you want to convert.
    • Use Text to Columns tool on the Data tab (ribbon).  This is limited to one column and doesn’t work on rows.
    • Functions – the VALUE() function works well, but there are many ways to do this too.
    • VBA/Macro – write your own code to automate the process

Do you have a different or easier way?  Please leave a comment.