ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Change Font Size (https://www.excelbanter.com/excel-worksheet-functions/6386-change-font-size.html)

Steve Klenner

Change Font Size
 
Is there a way to change the font size in a cell based on results of a given
cell?

Ex....change font size from 10pt to 8pt in cell a5 if cell a1 is 5.

Any help is appreciated

Steve





Frank Kabel

Hi
unfortunately does Excel's Conditional Format (menu Format -
Conditional Format') not allow such changes. So this would require VBA
(using an event procedure such as worksheet_change): See:
http://www.mvps.org/dmcritchie/excel/condfmt.htm

But if you like you may try out the following addin which also uses
event codes but is easier to use if you are not that experienced with
event macros:
http://www.xldynamic.com/source/xld.....Download.html


--
Regards
Frank Kabel
Frankfurt, Germany


Steve Klenner wrote:
Is there a way to change the font size in a cell based on results of
a given cell?

Ex....change font size from 10pt to 8pt in cell a5 if cell a1 is 5.

Any help is appreciated

Steve



JE McGimpsey

This would require an event macro. One way:

Put this in your worksheet code module:

Private Sub Worksheet_Calculate()
Range("A5").Font.Size = 8 - 2 * (Range("A1").Value 5)
End Sub

If you're not familiar with macros, see David McRitchie's "Getting
Started with Macros":

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In article ,
"Steve Klenner" wrote:

Is there a way to change the font size in a cell based on results of a given
cell?

Ex....change font size from 10pt to 8pt in cell a5 if cell a1 is 5



All times are GMT +1. The time now is 02:29 PM.

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