Yet another in-cell Excel bar chart technique

Two improvements over the technique described by Juice Analytics and posted in Lifehacker: better resolution and solid-looking bars that show better at different font sizes.

If your values are integers in a range 0-9 or so, you can use the REPT formula as presented there, and perhaps you like the dashed type bars, so the formula as shown would work perfectly for you. If not, keep reading.

For larger values, when you reduce them to a 0-9 range by dividing by a factor, you can use the decimal part to show a half character, having effectively 20 steps on your bars, instead of just 10 you would get with the simple “|” character. The trick is to use unicode character 0×2588 (dec 9608) that will show a full block, and character 0x258c (dec 9612)that will show a half vertical block.

To get those unicodes you can hold and press the Alt key (Windows PCs), then type 09608 or 09612on the numeric keypad, then release the Alt key. For most, this should work with the default input methos. Unfortunately this method is not universal and depends on selected settings and input methods. You can just go to a Excel cell, choose the menu “Insert->Symbol” and type 2588 or 258c on the box at the bottom reading “Character code”

Finally the formula to use is
Formula.

I’m showing above a picture so the formula shows well in your browser regardless of pagecodes. To copy and paste, here it is as text:

=REPT("?",TRUNC(D6/scale))&IF(MOD(D6/scale,1)>0,"?","")

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>