Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I don't think any of the respondents answered Katrina's question, and I have
the same question. Maybe if I restate it. In MS Word tables, you can set a white space margin within the cell, on each border of the text (i.e., left, right, top, bottom) to improve readability. If the text wraps to a new line, these margins are maintained. I do not see any parallel capability to do that in Excel. If you manually set the height, then wrapped text will be partially hidden. Am I right or wrong? "katrina" wrote: I know I can indent text in a cell from the left and from the right of the cell, but can anybody please tell me how to indent it from the top and bottom? I want to be able to autofit my rows to my text but leaving a gap at the top and bottom so it's not all squashed. I know I can make the rows bigger and then centre the text vertically, but this is for a very big document so I don't want to have to manually size each row. |
#2
![]() |
|||
|
|||
![]()
Try this macro to 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 07:53:03 -0800, "rasty_9" wrote: I don't think any of the respondents answered Katrina's question, and I have the same question. Maybe if I restate it. In MS Word tables, you can set a white space margin within the cell, on each border of the text (i.e., left, right, top, bottom) to improve readability. If the text wraps to a new line, these margins are maintained. I do not see any parallel capability to do that in Excel. If you manually set the height, then wrapped text will be partially hidden. Am I right or wrong? "katrina" wrote: I know I can indent text in a cell from the left and from the right of the cell, but can anybody please tell me how to indent it from the top and bottom? I want to be able to autofit my rows to my text but leaving a gap at the top and bottom so it's not all squashed. I know I can make the rows bigger and then centre the text vertically, but this is for a very big document so I don't want to have to manually size each row. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Maintaining cell reference after sorting | Excel Discussion (Misc queries) | |||
set cell margins | Excel Discussion (Misc queries) | |||
inserting data from a row to a cell, when the row number is specified by a formula in a cell | New Users to Excel | |||
Addition to Turn cell red if today is greater or equal to date in cell | New Users to Excel | |||
Unable to set the active cell from VBA | New Users to Excel |