ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I fill a cell with "+" based on a percent value? (https://www.excelbanter.com/excel-programming/435308-how-can-i-fill-cell-based-percent-value.html)

Dreiding

How can I fill a cell with "+" based on a percent value?
 
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






smartin

How can I fill a cell with "+" based on a percent value?
 
Dreiding wrote:
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.

Dreiding

How can I fill a cell with "+" based on a percent value?
 
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


"smartin" wrote:

Dreiding wrote:
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.
.


smartin

How can I fill a cell with "+" based on a percent value?
 
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/clea...imple-way.html


Dreiding wrote:
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


"smartin" wrote:

Dreiding wrote:
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.
.



All times are GMT +1. The time now is 09:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com