Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A cell of specific size gets a text string of variable length from another
sheet in the workbook. I would like to make the font size conditional based on the number of characters changes (i.e., more characters - smaller font). Conditional Formatting does not address font size. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub worksheet_Calculate()
Dim cell as Range, l as Long set cell = Me.Range("B9") l = len(cell.text) if l < 20 then cell.Font.Size = 12 elseif l < 50 then cell.font.Size = 10 elseif l < 100 then cell.Font.Size = 9 Else cell.Font.Size = 8 end if End sub Right click the sheet tab where you want this and select view code. Put in code like the above. -- Regards, Tom Ogilvy "Found in Florida" <Found in wrote in message ... A cell of specific size gets a text string of variable length from another sheet in the workbook. I would like to make the font size conditional based on the number of characters changes (i.e., more characters - smaller font). Conditional Formatting does not address font size. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You may want to try:
Format|cells|Alignment tab|text control section|check shrink to fit Not quite the same, but maybe... Found in Florida wrote: A cell of specific size gets a text string of variable length from another sheet in the workbook. I would like to make the font size conditional based on the number of characters changes (i.e., more characters - smaller font). Conditional Formatting does not address font size. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA returning "Null" for TextBox.Font.Size | Charts and Charting in Excel | |||
How do I set the default font size in the "comment" feature? | Excel Discussion (Misc queries) | |||
"SHEET TAB FONT SIZE"? | Excel Worksheet Functions | |||
very large font size when using "help" menu | Excel Discussion (Misc queries) | |||
Sending macro based e-mail with built-in "Heading" and "Text" | Excel Programming |