Is there a way to add padding to cells in Excel 2010?
The spreadsheet I'm using has cells in one column with varying row heights. I don't want to center the text, I just want it padded slightly from the left side.
Note: I'm on Excel 2007, but I would be surprised if this doesn't work.
Select the cells, right click, select Format Cells.
Move to the Alignment tab, set the Horizontal value to
Left (Indent) and adjust the Indent value as desired.
There should be two alignment buttons on the ribbon as well (that increase or decrease the indent), they look like this:
That's an 'indent'. Cell padding is exactly the same thing as page margins, but at the cell level. Excel does not currently support this feature although it is supported in Word tables. Go figure.
You can cheat and apply a border to all 4 sides of the cell that is the same color as the cell background. Do this in the Home tab - Format (in the cells group) - Borders, or select the cells and right click, then choose "format cells" at the bottom of the dropdown.
Make sure you click the border icons on the right AFTER you set the border color and width. Even if they are already highlighted, they do not apply the color unless they are clicked again after you select them and set the border color.
This takes a few steps, but it gets the look I want without the padding feature. I also like to center the type vertically once this is done.
I just press Alt+Enter before the first row and after last one (you must be in the cell by double clicking it).
Of course it is pain if you work dozens of data, but if you fill the rows from zero it does the trick.
This combines a couple ways of using formatting to simulate padding.
The Accounting comma-button
, format applies a space to the beginning and end of the cell value. This is actually putting a space for positive numbers and parentheses for negative numbers, but it adds spaces for text. Typically I first set the entire sheet to this format, then change individual columns or cells as needed, to "undo" the accounting formatting.
If you only need space to the right, create a custom format based on an existing format, by adding a space to the end of the format string.
e.g., a Date column tends to put the date right up against the cell edge to the right. I changed the format from
"yyyy-mm-dd " (there's a space on the end, and no quotes - that's just to see the space in this post).
I also put a leading space on the date format
" yyyy-mm-dd ", and it worked for dates. But it didn't work for text, such as the column heading. I could only get text to pad by using the built-in Accounting comma
, button. I'm not sure what's going on. I tried various combinations of the accounting-style
_(, but had no success other than using the comma button