I'm trying to use Wrap Text functionality. So if text is too large for a cell the row will be wider. But it doesnt work in my case. Does anybody can give an idea why is that?
First thing to check is whether the formatting actually "stuck". Select the cell, then go to Format>Cells and make sure that "Wrap Text" is selected on the Alignment tab. If it is not, something may be preventing that setting from being applied. One possibility would be sheet protection. If the cell is locked (see the Protection tab in the Format Cells dialog) and the sheet is protected, you won't be able to set the word wrap until you unprotect the sheet.
There must be something simple that we're overlooking here.
Can you post:
a) the exact contents of the cell
b) the column width (in points - click and hold on the border to the right of the column letter to see this)
and c) the font settings (size and font name)
I'll see if I can recreate your problem on my end.
Seems like you're setting wrap text, but not autofit on rows. Rows only autofit "now". That's not a future and automatic setting, see? You might need to make yourself a Worksheet_Change event macro that autofits your rows for you whenever you change any values in certain columns.
Ok. . . works on my end to. I'm wondering if the row height has been manually set to override the Wrap Text. If the data is just partially invisible (as opposed to overflowing into the cell to the right), try this:
At the left of the sheet, double-click on the border under the row number that contains the problem cell. See if it expands and shows your data.
Other than that, I'm thinking you just delete/recreate the row or column to kill whatever it is that's doing this. . .
Thank you Anne and VBAjedi. I needed to do the wrapping in VBA. I followed the above steps to record a Macro, and then used it as follows:
Dim i As Integer
For i = 1 To ActiveDocument.Tables.Count
ActiveDocument.Tables(i).Select
Selection.Tables(i).AutoFitBehavior (wdAutoFitContent)
Selection.Tables(i).AutoFitBehavior (wdAutoFitContent)
Next i
Not sure why the command has to be used twice! But it works. Hope it's useful for someone searching archives.. like me
It would have been helpful if you'd mentioned which application you were having problems with. A number of the responses you got indicated that the posters thought you were working with Excel, but your recorded macro suggests it was a Word table.
In Word, you should be able to get a row to expand/contract automatically to accomodate the amount of text just by going into Table|TableProperties|Row and either:
. unchecking the 'Specify height' option; or
. checking the 'Specify height' option, nominating a height, and setting the 'Row height is' option to 'at least'.
I think you misread the thread. . . this thread was started almost a year ago by Plato2, and WAS referring to an Excel issue. sheila11 was just searching the archives for helpful threads before posting a new one (and said so in her post).
Anyway, your Word settings suggestions were useful. . . thanks for that!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.