Pages

Monday 15 July 2013

Incell Bar charts – Revisited




1-incell-bar-charts-verticalizedI can never get tired of in-cell charts, whenever I get sometime, I try to experiment something on them. Here is an idea to design true incell column charts without using any add-ins or installing fonts. These charts can be fun to have on your project report or annual news letter or memos, they take as much time as munching a handful of M&Ms.
  Download excel chart containing incell bar chart example

1. First we will create in-cell chart using rept() the usual way

2-create-normal-incell-charts-firstThis is the simple step. For a sample data, we can use rept() excel function to repetitively print a symbol. Thus, by repetitively printing “|” (pipe) we can create incell bar charts.
REPT() example is shown below:
=rept("|",10) will print ||||||||||

2. Next combine several incell charts to create a column chart

We can combine various incell charts using excel’s concatenate() function or & operator. Better still you can use the concat() UDF. The trick here is we will delimit each chart with an ENTER key code by using char(10) as the delimiter. When used along with “wrap text” cell format this key code will force cell contents to a newline where the char code 10 is inserted.
3-now-create-combined-incell-using-concat

3. Finally rotate the cell contents by 900 to make the charts vertical

Just select the cell contents, hit ALT+1, and set the alignment formats so that the text is vertically aligned in the cell, and turn on wrap text.
4-finally-change-text-direction
That is all, you will now have an incell bar chart that is vertical like the one below:
5-final-chart
Pretty cool eh?

No comments: