I have seen the formatting property 'shrink to fit'. Is there a way to make
the cell expand to fit? For example I have a cell that concatenates
multiple cells in my questionnaire. Many times the amount of words in the
cell is too long for the length of the cell. I am using word wrap but I
have to physically enlarge the cell until I can see the last line of words.
My goal is to be able to print out all of the fields with all of the words
in the cells even if they do not show on the screen. I want the width of the
cell to remain the same, but only the number of lines printed to be
determined by the actual contents of the cell.
Manuel
Usually Format>Row>Autofit is sufficient when wrap text is enabled.
When it doesn't work is if you have any "merged cells" in the row.
They will not Autofit without using VBA event code.
Gord Dibben MS Excel MVP
>I have seen the formatting property 'shrink to fit'. Is there a way to make
>the cell expand to fit? For example I have a cell that concatenates
[quoted text clipped - 5 lines]
>cell to remain the same, but only the number of lines printed to be
>determined by the actual contents of the cell.
Manuel Murieta - 08 Feb 2007 21:00 GMT
Yes there is merged cells. What is the programming for the event code and
how do I go about doing that. Thank you.
> Manuel
>
[quoted text clipped - 18 lines]
>>cell to remain the same, but only the number of lines printed to be
>>determined by the actual contents of the cell.
Gord Dibben - 08 Feb 2007 21:15 GMT
Manuel
See this post..............
http://groups.google.com/group/microsoft.public.excel/browse_thread/thread/eb8b2
3e55857f901/a9ebf3aca5786e9b?lnk=st&q=&rnum=1#a9ebf3aca5786e9b
Note....this is worksheet event code. Right-click on the sheet tab and "View
Code"
Copy and paste Greg's code into that sheet module.
Gord
>Yes there is merged cells. What is the programming for the event code and
>how do I go about doing that. Thank you.
[quoted text clipped - 20 lines]
>>>cell to remain the same, but only the number of lines printed to be
>>>determined by the actual contents of the cell.