How can I fill a cell with "+" based on a percent value?

D

Dreiding

I have Excel 2003 and need the capability to fill cells with a character
symbol (+) based on a value (0-100). Where as 50% would only fill have the
cell, 100% the complete cell.

The issues I'm running into are related to the column width (what happens
when the user changes the column width) and the zoom factor. Not sure if the
monitor resolution has an impact. I've found that a zoom of 75 has a much
different impact than one of 50 or 80.

Thanks,
- Pat
 
S

smartin

Dreiding said:
I have Excel 2003 and need the capability to fill cells with a character
symbol (+) based on a value (0-100). Where as 50% would only fill have the
cell, 100% the complete cell.

The issues I'm running into are related to the column width (what happens
when the user changes the column width) and the zoom factor. Not sure if the
monitor resolution has an impact. I've found that a zoom of 75 has a much
different impact than one of 50 or 80.

Thanks,
- Pat

This works pretty well for me using Arial 8pt and a column wide enough
to differentiate between 40%, 50%. YMMV with other fonts; you may need
to include an adjustment factor for the font.

In B1:
=REPT("+",A1*CELL("width",B1))

where A2 has the % value.

This is immune (?) to zoom, but it needs to be recalculated if the
column width is changed.
 
D

Dreiding

Almost there! I really like your equation.
I set my Excel font default to Arial 8.
Unfortunately it's not immune to zoom.
Set the percent value to 100% and see how it fills the cell at different
zooms (75 vs 80). Is there info on what Excel does so I can adjust to it?

Thanks for you quick response!
- Pat
 
S

smartin

I see, it's not really immune to zoom, but let's face it, this is a bit
of a hack anyway--the worksheet grid was not intended to be a graphical
display.

The least display error, AFAIK, is obtained when the column width is
large. You could experiment with other characters and fonts. In
particular, try some graphical characters (unicode 2588 is a good one to
try) and possibly fixed-width fonts to see if display precision can be
improved.

If you are determined to display a % graph in a cell, a bullet chart
might be what you need. See:

http://peltiertech.com/WordPress/in-cell-bullet-charts/

(my favorite:)
http://www.clearlyandsimply.com/clearly_and_simply/2009/09/bullet-graphs-for-excel-a-simple-way.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top