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.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityIs 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"
to "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
While I did not find the current answers to this question (or answers anywhere else) satisfactory, they did inspire this answer, tested with Excel Version 2008. I rely on the following:
Putting these two together I find I can effectively "pad" a range of cells as follows:
Manually adjust the widths of all columns you wish to pad
Select all cells to be padded, go to Home, then select Format->AutoFit Row Height. This adjusts row heights to the minimum needed for their tallest cells.
Select all cells you wish to pad and use the Alignment tab of the Format cells menu (accessible by right-clicking the cells and striking your 'f' key) to format them as Text alignment->Vertical->Center. This ensures our vertical "padding" is evenly distributed on either side of each cell's content.
To pad horizontally, at this time you may use the same menu to also format your cells as Text alignment->Horizontal->Left (indent) and set an Indent value as desired (some of the other Horizontal settings will also work). If you do this be sure to deselect the Wrap text checkbox.
Insert a new column, probably column A:
In the newly-created column, in any cells you wish to vertically pad, enter a vertical column of any character, for example 'a':
Because Excel by default synchronizes the vertical height of all cells in a row, at this point you should notice a change in the vertical padding of other cells in the row of the cell you just tabbed out of. By entering more or fewer vertical characters you can control how much padding is added.
Once you are satisfied with the vertical padding of all rows, hide the column you created above. Vertical padding will remain in place as long as the column is not deleted.
As stated elsewhere, Excel does not support real padding as does Word. As such,