View Single Post
  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

Once you set the row height manually, it won't adjust to accommodate multiple
lines of text.

You must select the row(s) and FormatCellsAlignmentWrap Text and then
FormatRowAutofit.

You could record a macro while doing this or use this one.

Indent left and add a blank line top and bottom then wrap
text and autofit.

Note: won't work with "merged" cells.

Sub Indent_Text()
Dim Cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo endit
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = Chr(10)
For Each Cell In thisrng
With Cell
.Value = moretext & Cell.Value & moretext
.Rows.AutoFit
.IndentLevel = 2
End With
Next
Exit Sub
endit:
MsgBox "only formulas in range"
End Sub


Gord Dibben Excel MVP

On Mon, 10 Jan 2005 08:17:10 -0800, "jkmuldoon9"
wrote:

Gord, this was helpful. I found that I in fact did not have a book.xlt file
on my hard drive, so I don't know where the 12.75 default comes from. But it
leads to another question:
If I want to change the default row height, but maybe not for every future
document, can I do that? I tried this: opening a new blank worksheet,
selecting all cells, and dragging the row height up to 18.00. But when I
saved it as a template and opened a new worksheet based on it, with Wrap Text
on, the row height stayed fixed at 18.00 and did not change to accommodate
the multiple lines of text. So the question comes down to, how can I change a
single worksheet so that the DEFAULT row height is not pinned to 12.75? How
to change the row height to leave a bigger margin of white space around the
text, without losing the auto-height feature? Word Tables can do it; can
Excel?

I could do what I did to that template, and save it as Book.xlt; but I am
afraid that this would apply the changes to every new document I open. I
don't want to do that. I just want to have control over the default cell
height without giving up Excel's capability for the worksheet to increase
that height as needed.

Thanks, jkmuldoon9


"Gord Dibben" wrote:

Community Message Not Available