How to Indent in Excel: Cells, Lists and Shortcuts
By ExcelReady TeamUpdated 6 min read
The short answer
To indent in Excel, select the cells and click Increase Indent on the Home tab, in the Alignment group. On Windows you can press Alt, H, 6 to indent and Alt, H, 5 to remove it. For an exact amount, open Format Cells (Ctrl+1 or ⌘1), go to Alignment and set the Indent box.
Key takeaways
- Increase Indent and Decrease Indent sit on the Home tab, in the Alignment group.
- On Windows, Alt, H, 6 indents and Alt, H, 5 removes indent, pressed one key after another.
- Format Cells > Alignment lets you set an exact indent level and indent from the left or the right.
- Indent formatting changes only how the cell looks. Typed spaces change the value and break lookups and sorting.
- To indent a line inside a cell, start a new line with Alt+Enter (Windows) or ⌃⌥Return (Mac) and add spaces.
On this page+
To indent in Excel, select the cells and click Increase Indent on the Home tab. Each click moves the text a little further from the edge of the cell, and Decrease Indent moves it back. This guide shows the buttons, the keyboard shortcuts, exact indents in Format Cells, and how to indent sub-items in a list without typing spaces that break your formulas.
How to indent in Excel with the Increase Indent button#
The quickest way to indent is the pair of indent buttons in the Alignment group of the Home tab. They look like lines of text with a small arrow pointing right (increase) or left (decrease).
- Select the cell or cells you want to indent.
- Go to Home > Alignment.
- Click Increase Indent once for each level you want.
- Click Decrease Indent to move the text back.
Indent is a format, like bold or a border. It changes how the cell looks, not what it contains. If A3 holds "Salary" and you indent it twice, the cell still holds exactly "Salary", so =A3="Salary" is still TRUE.
You can select a whole block, such as all the sub-items in a budget, and indent them in one go. Indent works with other alignment formats too: you can combine it with wrapped text in a cell, but not with merged cells set to Center, because centred text has no left edge to indent from. If you have used Merge and Center, switch to Left alignment first.
Keyboard shortcuts to indent cells#
On Windows, use the ribbon key tips: press the keys one after another, not all at once.
| Action | Windows | Mac |
|---|---|---|
| Increase indent | Alt, H, 6 | Home tab > Increase Indent |
| Decrease indent | Alt, H, 5 | Home tab > Decrease Indent |
| Open Format Cells (exact indent) | Ctrl+1 | ⌘1 |
| New line inside a cell | Alt+Enter | ⌃⌥Return |
Press Alt and you'll see letters appear on the ribbon. H opens the Home tab, and 6 or 5 clicks the indent button. Press the sequence again to add another level. Excel for Mac does not use ribbon key tips, so use the buttons or the Indent box in Format Cells. For more time-savers like these, see the strikethrough shortcut and other format keys.
How to set an exact indent in Format Cells#
Format Cells gives you full control: the exact indent level and the side to indent from. Use it when you want every level in a report to line up the same way.
- Select the cells.
- Press Ctrl+1 (Windows) or ⌘1 (Mac) to open Format Cells.
- Click the Alignment tab.
- Under Horizontal, choose Left (Indent), Right (Indent) or Distributed (Indent).
- Type a number in the Indent box, such as 2, and click OK.
Each indent level is about the width of one character in the cell's font. Level 0 means no indent. Right (Indent) pushes text or numbers away from the right edge, which is useful for numbers, as you'll see below.
How to indent sub-items in a list#
To show a list with levels, put the main items at indent 0 and the sub-items at indent 1 or 2. A simple budget looks like this:
| A | B | |
|---|---|---|
| 1 | Label | Amount |
| 2 | Income | 5,200 |
| 3 | Salary (indent 1) | 4,800 |
| 4 | Bonus (indent 1) | 400 |
| 5 | Costs | 3,100 |
| 6 | Rent (indent 1) | 1,900 |
| 7 | Utilities (indent 1) | 1,200 |
Select A3:A4 and A6:A7 together (hold Ctrl, or ⌘ on a Mac, while you select the second block), then click Increase Indent once. The headings stay at the edge and the details step in. Add borders under the totals and the structure is clear at a glance.
Because the labels are unchanged, formulas still match them. =SUMIF(A2:A7,"Rent",B2:B7) returns 1,900 whether Rent is indented or not.
How to indent text inside a cell#
To indent one line inside a cell, start a new line and type spaces in front of it. Indent formatting always moves the whole cell, so this is the only way to indent just part of it.
- Double-click the cell, or press F2 (Windows) or ⌃U (Mac), to edit it.
- Put the cursor where the new line should start.
- Press Alt+Enter (Windows) or ⌃⌥Return (Mac) to start a new line.
- Type a few spaces, then the text.
Excel turns on Wrap Text for the cell so the line break shows. This is fine for notes and comments. For data that you will filter, sort or look up, keep one value per cell and use indent formatting instead.
Why you shouldn't indent with spaces#
Typing spaces in front of a label looks like an indent, but it changes the value. " Salary" with four spaces is a different text from "Salary", so:
=XLOOKUP("Salary",A2:A7,B2:B7)can't find it and returns #N/A.=COUNTIF(A2:A7,"Salary")returns 0.- Sorting puts the spaced labels together at the top, away from their group.
You can spot spaces with LEN and TRIM. TRIM removes leading and trailing spaces, so this formula counts how many spaces a label starts with:
=LEN(A4)-LEN(TRIM(A4))If A4 holds " Bonus" (eight spaces, then Bonus), the result is 13 − 5 = 8. To clean a whole column, put =TRIM(A2) in a helper column, fill it down, then copy it and paste it back as values. After that, re-apply the indent with the Increase Indent button.
There is one fair use for spaces: a display column built by a formula. If B3 holds a level number, =REPT(" ",B3*4)&A3 builds an indented label for a printed report, while column A keeps the clean name for formulas.
Indenting numbers and pivot table rows#
Numbers need a little care. When you click Increase Indent on a number, Excel switches it to left alignment, so the digits no longer line up on the right. To keep numbers right-aligned with a gap after them, open Format Cells, choose Right (Indent) and set the Indent box to 1. This keeps decimal places in line, which matters when you format numbers as currency or percent.
Pivot tables indent their own row labels. In the default Compact layout, each inner field steps in under the outer one. To change how far, right-click the pivot table, choose PivotTable Options, open Layout & Format, and change When in compact form indent row labels to the number of characters you want. To remove the steps entirely, go to the PivotTable Design tab (called Design in older versions) and choose Report Layout > Show in Tabular Form, which puts each field in its own column.
Practise it#
Indenting is quick once your hands know where the buttons are. Practise alignment and more formatting in a live spreadsheet: you format real cells and the page checks your work instantly. Then build speed with the formatting shortcuts lesson, and try the exercise on this page to find labels that were indented with spaces.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Someone indented the budget lines by typing spaces. In C4, count how many leading spaces the label in A4 has with =LEN(A4)-LEN(TRIM(A4)).
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Amount | |||
| 2 | ||||
| 3 | Spaces in A4 | |||
| 4 | ||||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 8 | ||||
| 9 |
Tip: LEN counts every character. TRIM removes the leading spaces, so the difference is the number of spaces.
Practise this in a lesson
Frequently asked questions
What is the shortcut to indent in Excel?
On Windows, press Alt, then H, then 6 to increase the indent, and Alt, H, 5 to decrease it. Press the keys one after another, not together. On a Mac, use the Increase Indent button on the Home tab or the Indent box in Format Cells (⌘1).
How do I indent text within a cell in Excel?
To indent the whole cell, use Increase Indent. To indent only the second line, press Alt+Enter on Windows or Control+Option+Return on a Mac to start a new line, then type spaces before the text.
Why can't I indent a number in Excel?
You can, but Increase Indent makes the number left-aligned. To keep it on the right with space after it, open Format Cells, choose Right (Indent) under Horizontal and set the Indent box.
Does indenting change the cell value?
No. Indent formatting only changes how the cell looks, so formulas, sorting and lookups still see the original text. Spaces you type yourself do change the value.
How do I remove all indents in Excel?
Select the cells and click Decrease Indent until the text is back at the edge, or open Format Cells and set the Indent box to 0. To remove typed leading spaces, use the TRIM function.