In-cell Bar Charts Using the REPT Function

This section of the forum needed a post, so here’s a trick. You can create in-cell bar charts using the REPT function, like this:



or for more robustness, where B6 is the cell containing the number:


You can change the color of the bar by changing the font color.

This type of chart (if using dots) would be called a dot plot, so the length of the bar is discrete rather than continuous, but if you are okay with that, you can scale the chart to a length of up to 10 characters by rounding, like this:


Almost as good as in-cell data bars, but it requires two columns. Still, this lets you use any unicode character you want (instead of the block character).


This is so cool :star_struck:

A template is now included in the gallery titled “Pros and Cons with Tornado Chart” which demonstrates the use of this technique and the formulas.