Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default increase cell margins globally like word?

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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
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!


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
Excel - allow cell margins similar to Word table cells Liz Geho Excel Worksheet Functions 1 April 5th 06 07:18 PM
Cell Margins macka63 Setting up and Configuration of Excel 2 September 26th 05 07:40 AM
set cell margins Junebug Excel Discussion (Misc queries) 6 February 17th 05 04:52 PM
How can I strip a new line /nl in a cell in Excel globally Joe Excel Worksheet Functions 1 February 10th 05 07:29 PM
cell margins rasty_9 Setting up and Configuration of Excel 1 January 10th 05 07:26 PM


All times are GMT +1. The time now is 04:50 AM.

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"