#1   Report Post  
rasty_9
 
Posts: n/a
Default cell margins

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   Report Post  
Gord Dibben
 
Posts: n/a
Default

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
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
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
set cell margins Junebug Excel Discussion (Misc queries) 6 February 17th 05 04:52 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
Unable to set the active cell from VBA HMS New Users to Excel 1 December 7th 04 09:56 PM


All times are GMT +1. The time now is 07:49 PM.

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

About Us

"It's about Microsoft Excel"