Lightweight data exploration in Excel

Lifehacker, delicious folks! This post generated a ton of great community ideas. Check out our followup post to see some more ideas and to download a spreadsheet with demos. Thanks.

We often are given a chunk of data in Excel that we need to explore. Of course, the first tool you should pull out of your toolbox in cases like this is the trusty PivotTable (it slices, it dices!). But at times we have to dig a little deeper into the toolbox and pull out the in-cell bar chart. Here's what it looks like.

In cell bar charts in Excel

This picture shows some Major League Baseball data. I'm graphing the number of walks each player has taken. The bar graphs are built using the Excel REPT function which lets you repeat text a certain number of times. REPT looks like this:

=REPT(text,number_of_times)

For instance, REPT("X",10) gives you "XXXXXXXXXX". REPT can also repeat a phrase; REPT("Oh my goodness! ",3) gives "Oh my goodness! Oh my goodness! Oh my goodness! " (my daughter's an Annie fan).

For in-cell bar charts, the trick is to repeat a single bar "|". When formatted in 8 point Arial font, single bars look like bar graphs. Here's the formula behind the bars:

The formula behind the bar

What are some practical uses of in-cell bar graphs? For starters, they offer a good way to profile a dataset that has hundreds or thousands of rows. Here's a picture of in-cell bars compared to a standard excel bar graph for a dataset with about 500 rows. It can be a lot easier to scan the results when they're in-cell.

Exploring tall data with in-cell bar graphsExploring the same data with an Excel bar graph

Another usage is lightweight dashboards. The report below compares a number of metrics for players using both in-cell bar graphs as well as conditional formatting. The conditional formatting highlights the top 25% of each metric in green and the bottom 25% in red, but that is a story for another day.

The formula behind the bar

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.

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


November 29, 2009
fullo said:

wingdings gives a good solid square to use with this.


December 9, 2009
Cat said:

I've been using "g" on the webdings font which gives a solid bar !


February 20, 2010
Rayan Jawad said:

Brillint!


March 2, 2010
Andrew said:

Unicode characters (eg in Lucida Sans Unicode - as installed on my machine here) have filled boxes in 1/8th increments (in the Block Elements section) if you want to go down to that level... (changes the formula to one with two sections: use div and mod to get the count of full boxes and 1/8ths respectively)


March 3, 2010
Mark said:

At 100% zoom try Arial Narrow at 8pt and the following formula: =CONCATENATE(REPT("|",C6/20)," ",C6) change the params to your requirements - the 'C6' at the end puts the value of the cell at the end of the bar.
What I would like to know is how to use and Alt+code in the function - anyone?

Your name

Email (optional, will not be shared)

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

Your comment


Add a comment