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.

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


February 18, 2009
friend said:

In excel, go to Insert-->Symbol. Scroll through the list until you find the solid black rectangle symbol. click on insert and it will insert into a blank cell. Copy this symbol and paste it into the formula REPT("symbol",B3) as an example. You can change the font color to make it a different color. This makes a solid bar. Hope this helps!


March 20, 2009
Peter said:

this is awesome! many thanks!


March 20, 2009
Drifter said:

This is Great!

Thanks!


March 21, 2009
Dinesh K Takyar said:

Impressive. Well explained.
http://www.familycomputerclub.com


May 7, 2009
GAC said:

Excellent. Very good and simple tool.
GAC from Chile

Your name

Email (optional, will not be shared)

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

Your comment


Add a comment