Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default SHRINK AND WRAP

Right-click on the sheet tab and "View Code"

Paste into that sheet module.


Gord

On Wed, 17 Jun 2009 13:13:01 -0700, Pam M
wrote:

Hey, that looks great! I'll give it a try and let you know. In the
meantime, do I put that in the This workbook in the VB editor?

"Gord Dibben" wrote:

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.





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get date/time to wrap (format - wrap text doesn't work)? Alex Excel Discussion (Misc queries) 3 April 4th 23 02:29 PM
Format cell to both Wrap text and shrink to fit dunnL1 Excel Discussion (Misc queries) 1 March 5th 08 04:38 PM
want to use word wrap and shrink to fit salts Excel Discussion (Misc queries) 0 October 11th 07 07:18 PM
shrink to fit and wrap text exhausted everything Excel Worksheet Functions 0 January 27th 06 03:05 PM
Shrink to Fit jzapatka Excel Discussion (Misc queries) 0 March 14th 05 03:52 AM


All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"