How to change Font size based upon cell input

A

Ashley McKay

Hiya,

I'm in the midst of creating a spreadsheet, and I need one particular column
to change the font size based upon the returned data.

Is it posibel to do this within excel itself, without resorting to VB or a
macro?

Thanks in advance,
 
T

Trevor Shuttleworth

You might be able to do it with Conditional Formatting ... but you'll have
to be more specific about what you want to happen and when.

Regards

Trevor
 
A

Ashley McKay

OK,

I have a sheet that calculates the number of hours of sick leave taken from
a specific day, and returns "Sick (XX)" in the column in question.

However, depending upon how much sick leave has been taken, the length of
the returned statement (Sick (XX)) changes.

What I would like is for the font size to be altered and made smaller for a
returned statement of "Sick (2.83)" and made larger for one of "Sick (3)".

Is that possible?

Ashley.
 
T

Trevor Shuttleworth

I guess I'm still not sure exactly what you want to achieve. If it's
because the length of the text is longer, you could just use Format |
Cells... | Alignment tab | Text control = shrink to fit

That would mean that "Sick (2)" and "Sick (3)" would have the same size font
but "Sick (2.83)" might be less depending on the column width.

Alternatively, you could use =LEN(cell address) to get the length of the
data.

=LEN(D2) = 11 for "Sick (2.83)" in cell D2 ... not including the quotes.
Use in the conditional format.

You just need to determine what font size for what lengths of text ... but
you've only got three options (Excel 2003 and earlier)

Regards

Trevor
 
A

Ashley McKay

Thanks Trevor,

I've never needed to change font sizes dynamically, and I was no aware of
the 'shrink to fit' formatting option.

Makes me feel very inexperienced and new at this... :)

Thanks again!

Ashley.
 
T

Trevor Shuttleworth

You're very welcome. Thanks for the feedback. I wouldn't worry too much;
there's plenty to go at !

Regards

Trevor
 
Top