More on Excel in-cell graphing

We received an enthusiastic response to our post on in-cell bar graphs in Excel. The community quickly explored every edge case. I want to highlight some of the great ideas raised.

Henk was first out of the gate with a great suggestion that two columns could be used to show positive and negative values. What he's thinking of looks like this:

Using two columns to show positive/negative values

Clint compares this approach favorably to the upcoming Excel 12's gradient fills. Here's a comparison:

Excel 12's in cell bar graphs—the gradient fill is poor designExcel 12—the gradient fill is bad infographics

In cell bar graphs using rept--looking goodIn cell graphs--better

Benjamin Selmer, derek, and Chris Grant had some nice ideas to improve the look of the bars by choosing different fonts or characters. Fonts that may work include Niagara Solid and Stencil.

You can also use characters other than a bar to nice effect. Here's a dot graph created by repeating spaces terminated with the letter "o".

An in-cell dot graph

Here's an anchored dot graph created by repeating dashes terminated with the letter "o".

An in-cell anchored dot graph

You can also label the bar with a value by concatenating the value after the bars. Remember, you can use "&" to glue together text strings in Excel formulas.

A labeled bar graph

You can change the width of the bar by dividing the value your graphing by some numbers.

Changing the width of bar graphs

Some folks raised the interesting (some would say perverse ;-) ) idea of using this technique to create Gantt charts. Here's an example. I'm using the fact that the width of a space character is exactly 1.5x the width of a bar character in Arial to make this work.

A lightweight Gantt chart

Finally, here's an Excel spreadsheet illustrating all these techniques.

Excel in-cell graphing ideas.xls

It's humbling to see the explosion of interest and all the great and diverse ideas. Thank you to all contributors.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. All source code is released under a BSD License unless otherwise specified.

81 comments | Show all comments only the last 5 are shown


January 30, 2008
Smitha said:

Thanks Derek. My client was informed by someone that they got the autoshapes displayed using IF-cond and now I have to implement the same. But from what I was analyzing since yesterday, I didnt get a break through. Thanks for your comments/information. In case I get any info, I would share the same here.


February 4, 2008
Steve said:

A better character for the REPT function is ALT+219.

This produces █, which looks much better than a a thin line, when repeated.


June 20, 2008
Andrea said:

This is a fantastic post. The methods are really clever, and a wide variety of permutations are considered. I'm interested in making in cell bar graphs that go vertically. As someone else has posted, you can change the allignment or the orientation of the font to accomplish this. But I'd like the width of the bar to equal the width of the cell so that there is no gap between the bars as one looks horizontally. And, I'd like there to be no gap between the bars going vertically too. I think this means that I need a character that is as wide as a cell or as tall as my cell's width, and tall enough so that two typed together and then oriented up/down do not produce a gap. I looked for a such a character, but couldn't find one in Webdings or other symbol fonts (Webdings "g" is great, as suggested by another, but it is not "tall enough"). I tried to use a dash (_) and make the font really big, but then the cell had to be really big in order to see it, and there was still a gap when they were "stacked" vertically. It made me want to make my own character, but I have no idea how to do that. Does anyone have any thoughts on how to do this? I can also make a regular "bar graph" (using the chart wizard, etc,) but it is hard to allign it so that the bars are exactly the width of a cell, and then by the end of the row, the bars are not quite underneath the cells that characterize them. Thanks in advance.


June 30, 2008
Mike said:

You can convert the bars into columns using Excel's often forgotten Camera tool - in Excel 2003 you'll find it in in Customize under Tools.

Build the bars as in the example spreadsheet then simply highlight them, click the camera and paste the resultant picture. The picture will update as the data changes but can be rotated or scaled as necessary.


July 9, 2008
Wallace said:

The Haettenschweiler font, which came with my Excel 2000 installation, makes a nice, tall solid bar at 10 pts and 100% zoom.

Regardless of font, it seems they don't scale well if you zoom the Excel view or try to paste into another application. I've had to use a screen capture for that. Still, it's a great tool.

Your name

Email (optional, will not be shared)

Type the word "juice" (required to confuse the spammers)

Your comment


Add a comment