From: Steerpike on
This is in XL2003. I'm trying to make a simple in-cell graphic that
visualizes a percentage created by two other cells. Here's the formula in
cell K45:


(Columns I and H contain the values from which I'm deriving a percentage.)

Is there any way to alter this, though, so that it takes into account the
width of the column in which the cell resides? As is, either I have to lock
the column down so that, in a given font, a 100% graph exactly fills the
width, or I need to format the cell to "shrink to fit," which the font won't
render if the column approaches a minimum threshold.

The problem is that my boss REALLY likes the simplicity of the in-cell
graph, but wants to be able to widen the column for some presentations in
which the graphic will be especially useful. As it is, he (or me, actually)
has to futz with the formula and font each time, which is annoying.

It seems to me that it should be possible to invoke the CELL function in the
second argument of the REPT function to make the number of strokes that are
repeated proportional to the the width of the column the graph is in, like


But of course, this doesn't actually work, because, all sense of the
original percentage being represented is lost. Is it possible to use some
variation on this idea, however, to use the width of the graphing column
(whatever it is, super-wide or fairly narrow, depending on what my boss wants
for a presentation) as the equivalent of 100% and have it "fill" based on the
percentage being generated by the original formula?

Sorry about the long question, but if anyone could help, I'd really
appreciate it.