Excel – Stacked column chart in Excel with the label of x-axis between the bars

chartsmicrosoft excelmicrosoft-excel-2007

I want to draw a stacked column chart in Excel and I want to put the label of the x-axis between the bars; for example:

Best Answer

You can easily enough fake this, if you can follow this protocol.

Here is the data for the red and green bars, and a second set of XY data, with X values where you will show labels.

Below the data is a stacked column chart using the first block of data.

histogram data, axis data, and preliminary chart

Copy the second range, select the chart, and use Paste Special to add the data as new series, series in columns, series names in first row, and category data in first column. It's added as a new set of stacked bars, which don't show up because their height is zero.

Select the added series by selecting the green bars and clicking the up arrow key. Click the menu key (between the right Alt and Ctrl buttons) or hold Shift and click the F10 function key to pop up the context menu. Click Change Series Chart Type, and choose XY Scatter. This adds a set of markers along the bottom of the chart (blue circles in the top chart below) and it adds secondary X and Y axes.

Format the scale of the secondary horizontal axis (top of chart) so it fits the data: min = -115, max = -50 (bottom chart below). Note that the markers are now aligned between the bars, where the labels will go.

enter image description here

Hide the secondary axes by formatting the label position as No Label, and the line color as No Line. Hide the primary horizontal labels by using a custom number format of " " (that's right, a space surrounded by double quotes). This hides the labels but keeps the space there for the other labels we're going to add (top chart below).

Right-click the series of dots, and choose Add Data Labels. You get the default Y values (zeros) added to the right of the markers (bottom chart below).

enter image description here

Format the labels so they are in the Below position, and so they show the X values instead of the Y values (top chart below).

Finally format the series of dots so they use no markers (bottom chart below). And you're done.

enter image description here