View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default increase cell margins globally like word?

Horizontally you can pad using FormatCellsAlignmentIndent.....right or left.

Vertically is another matter.

This macro will add a carriage return to right side of any text in a cell which
will give you a vertical padding.

Sub Add_Text_Right()
Dim cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo justformulas
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = Chr(10)
For Each cell In thisrng
cell.Value = cell.Value & moretext
Next
Exit Sub
justformulas:
MsgBox "only formulas in range"
End Sub


Gord Dibben MS Excel MVP

On Tue, 5 Jun 2007 08:06:01 -0700, Diane B
wrote:

I have a file with different row heights; I don't want the rows to be all the
same height - I want them to fit to contents, but I want there to be some
padding between cells. In Word tables you can highlight the rows you want,
regardless of their individual height, and enter whatever cell margin you
want and it affects all selected rows. Is there a way to do this in Excel?
Thanks!