SHRINK AND WRAP
I grasp the concept of what you want.
Unfortunately Excel is "either/or" in this case.
Would be nice to have a non VBA method of allowing both functions.
Something like this using event code.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo stoppit
Application.EnableEvents = False
If Target.Address = "$A$1" And Target.Value < "" Then
With Target
If Len(.Value) 10 Then
.Font.Size = 6
.WrapText = True
Else
.Font.Size = 8
End If
End With
End If
stoppit:
Application.EnableEvents = True
End Sub
Gord
On Wed, 17 Jun 2009 11:38:01 -0700, Pam M
wrote:
Its hard trying to explain yourself to a computer! I have a cell that is 5
wide and 15 high, font size is 8, and cell will hold a job name. Allowing
it to both wrap and shrink to fit would allow the letters to be bigger when
the job name is long, such as Waterford Landing Office Park . Otherwise, the
letters become so tiny to stay on one line that you can't read them.
"Gord Dibben" wrote:
Having both functions in one cell does not make sense so Excel helps you by
not allowing it.
Shrink to fit reduces the font size so's every character will fit the column
width.
What's to wrap?
Gord Dibben MS Excel MVP
On Wed, 17 Jun 2009 08:06:03 -0700, Pam M
wrote:
Is there any way to keep text wrap but apply the shrink to fit also? When
you click the wrap, the shrink is no longer an option. Selecting shrink
first leaves it checked but it doesn't shrink, it just wraps.
|