Sunday, July 19, 2009

Creating a non-graphic chart directly in a range

This tip describes how to create a non-graphic chart. It uses formulas to display crude "bars" directly in a range of cells.

The figure below shows an example of what you can produce with his technique.

The formulas in columns E and G graphically depict monthly budget variances by displaying a series of characters in the Wingdings font. The number of characters displayed is determined by an IF function.

To re-create this chart in Excel, enter the data shown in columns A through D, and then enter the following formulas:

E2: =IF(D2<0,rept("n",-round(d2*100,0)),"")>
F2: =A2
G2: =IF(D2>0,REPT("n",-ROUND(D2*-100,0)),"")

Assign the Wingdings font to cells E2 and G2, and then copy the formulas down the columns to accommodate all the data. Right-align the text in column E, and adjust any other formatting as you like.

Depending on the numerical range of your data, you may need to change the scaling. Experiment by replacing the '100' value in the formulas. You can, of course, substitute any character you like for the "n" in the formulas to produce a different character in the chart.

No comments:

Post a Comment