7 Ways to Add Indents in Microsoft Excel

Learn how to indent in Excel in easy steps with illustrations so you can practice the indentation process yourself without getting confused.

Microsoft Excel is the most widely used spreadsheet software to store, organize, analyze, and visualize data in any way you want to extract actionable insights. Also, it offers various text formatting features so you can make your reports or dashboards look good, readable, and organized. One such feature is text indentation.

When you’re making a project timeline, financial report, or outlining hierarchical structures, the indenting feature of Excel comes in handy. However, it could pose a challenge if you don’t know multiple ways to introduce indentation in Excel. So, to avoid the risk and show off your Excel skills, read this article until the end to become a master of indenting in Excel.

Indent in Excel Using Alignment Block

Decrease and Increase Indent buttons
Decrease and Increase Indent buttons

The Alignment block in the Home tab of the Excel ribbon contains the indenting feature of Excel. Here, you’ll find the Decrease Indent icon facing left and the Increase Indent button facing right. You can find these buttons just below the Orientation button.

The indenting feature would only work if you have simply selected the cell or cell range. If you start editing a cell, the Decrease Indent and Increase Indent icons become inactive.

Highlight target cell
Highlight target cell

Suppose, your text string or numerical value is in A1 and you’d like to add indents to move the block of text or value inward from the left or right cell borders. Select this cell and go to the Alignment block in the Home tab.

Increasing indent in Excel
Increasing indent in Excel

Now, click the Increase Indent button to move the cell contents away from the left-side cell border to the right side. To take the text much farther from the cell border, you must click the button a couple of times.

No text or numbers in row except column A
No text or numbers in row except column A

Now, the text you’re indenting would only show as long as there are no other text strings or values in the rest of the columns of the row. For example, the text is only available in column A and the rest of the columns are empty.

Overlapping text in another column on same row
Overlapping text in another column on the same row

However, if there’s value in any of the columns of the row, the text you’re indenting would overlap and go below the text further down the row. So, column data availability is also a critical consideration when you indent in Excel.

Decrease indent with shortcut key
Decrease indent with shortcut key

If you wish to indent text or values in Excel using a shortcut, you can do so by pressing the Alt + H + 6 keys. By pressing this key combination you introduce a right indent.

To reduce indent or to indent left, you must press Alt + H + 5.

Indent in Excel Using Format Cells

The indenting process using the default buttons is highly manual and repetitive. You must keep clicking to increase the indent, which is a time-consuming process. There’s a better alternative you can use to increase or decrease indents much faster by clicking only a few times compared to the default tool.

Format cells dialog
Format cells dialog

To use this advanced method, highlight the cell or cell ranges to which you want to add indenting. Now, press Ctrl + 1 to bring up the Format Cells dialog.

Enter indentation value
Enter indentation value

In the Format Cells dialog, go to the Alignment tab. Highlight the value inside the Indent field and enter the amount of indenting you want, like 20, 30, etc.

How to indent in Excel using Format Cells
How to indent in Excel using Format Cells

Click OK to apply the changes you’ve made.

Indent in Excel Using a Formula

The CHAR in Excel allows you to identify a character using the ANSI character coding system. For example, CHAR (32) returns a space character in Excel. Since indenting in Excel is nothing but adding spaces between the content of the cell and the left or right cell borders, you can easily use CHAR (32) to indent in Excel.

A CHAR formula to indent in Excel
A CHAR formula to indent in Excel

Suppose, you’d like to indent by 5 spaces in a cell, you must enter the following formula inside the target cell and hit Enter:

=CHAR(32) & CHAR(32) & CHAR(32) & CHAR(32) & CHAR(32) & A1

Don’t forget to change the cell reference to an appropriate cell address according to your own dataset.

If you find this formula a bit unmanageable, you can create a custom formula using the ampersand symbol. Ampersand enables you to concatenate two characters, cells, texts, or values in Excel. So, you can add spaces and concatenate that with the target cell reference to quickly and efficiently indent in Excel.

Ampersand formula to indent in Excel
Ampersand formula to indent in Excel

When adding spaces for indenting, ensure you enclose those spaces within double quotes inside the formula bar. Find below the formula you can use:

="     "&A1

The above formula shall introduce indenting by 5 spaces. All you need to do is change the cell reference according to your worksheet.

Indent in Excel Within the Cell

If you’re editing cell content, you can’t use the default Increase or Decrease Indent tool of Excel. You must manually add spaces between two texts or numbers.

Edit cell
Edit cell

Select the target cell and hit F2 to access the cell editing mode. The cursor shall move to the end of the content of the cell.

Now, use the Left Arrow to move the cursor to the left or the Right Arrow to move the cursor to the right to take the cursor where you’d like to add indentation.

Indenting using space bar
Indenting using the space bar

Now, press the Space bar 5 times to introduce 5 indents to the right of the cursor position.

Delete spaces to reduce indenting
Delete spaces to reduce indenting

To reduce indenting, you must delete the spaces.

Indent in Excel for a Text Box

Besides a cell or cell range, you can also indent in various objects like Text Boxes, Shapes, SmartArt, and more.

Draw a text box
Draw a text box

Suppose, you’d like to add a text indent into a Text Box. To achieve that, go to the Insert tab on the Excel ribbon menu and click on the Text Box button inside the Text commands block.

This should activate the Text Box drawing cursor. You can draw a Text Box on your worksheet.

Small text formatting box
Small text formatting box

Type your text inside the Text Box and double-click to select the whole text. A small text formatting box should show up above the selected text.

Increase List Level or increase indent
Increase List Level or increase indent

Now, click the indent-like icon known as the Increase List Level for Excel objects to add the right indent. For example, you must click 5 times to add 5 space indenting.

For other Excel objects like Shapes and SmartArts, the indenting process is the same as that of Text Boxes.

Indent in Excel Using Custom Formatting

This is another quick and efficient method to add indent spaces in a cell or range to move the text or numerical values away from the left or right cell borders.

You simply need to bring up the Format Cells dialog, enter a custom cell formatting code, and you’re done.

Format Cells tool
Format Cells tool

Firstly, highlight the cell range to which you’d like to introduce text indenting. Press Ctrl + 1 to bring up the Format Cells dialog.

Entering a custom code
Entering a custom code

In Format Cells, go to the Number tab and click on the Custom category in the left-side navigation pane of the dialog box.

In the Type field of the right-side menu of the Format Cells dialog, enter the following custom code:

     @

Click OK to save the changes.

Add indent using Custom code
Add indent using Custom code

Excel shall introduce similar numbers of right indenting matching the numbers of spaces in the formula. For example, the above formula adds 5 indent spaces into the cell before the cell contents.

Reduce indent using custom code
Reduce indent using custom code

Now, to revert the indents back to normal, you can use the following custom code:

@

The above code removes all indents of the cell.

Indent in Excel Using Excel VBA

You can introduce automation to indentation in Excel using the Excel VBA scripting technique. To use this method, you don’t need to know VBA scripting. However, if you know how to write VBA scripts in Excel, you can create better automation.

Find below a VBA script that helps you to automatically add indents in cells in Excel:

VBA script to do indenting in Excel
VBA script to do indenting in Excel
Sub IndentCells()
    Dim TargetRange As Range
    Dim IndentSpaces As Integer
    Dim Cell As Range

    ' Show an input box to select the target cell or cell ranges
    On Error Resume Next
    Set TargetRange = Application.InputBox("Select the target cells", Type:=8)
    On Error GoTo 0

    ' If no range is selected, exit the subroutine
    If TargetRange Is Nothing Then Exit Sub

    ' Show an input box to specify the number of indent spaces
    IndentSpaces = Application.InputBox("Enter the number of indent spaces", Type:=1)

    ' Loop through each cell in the target range and add the indent
    For Each Cell In TargetRange
        Cell.IndentLevel = IndentSpaces
    Next Cell

End Sub

If you want to find out how to quickly create a VBA macro using this script, check out the following Excel tutorial:

📒 Read More: How To Use The VBA Code You Find Online

Input box for cell range
Input box for cell range

When you execute the VBA macro, Excel shows you an input box so that you can select a cell or cell range using the mouse cursor.

Input box for indent steps
Input box for indent steps

Then, you also see a prompt to enter the number of indent steps you want to add.

Indent in Excel using VBA
Indent in Excel using VBA

Once you supply these inputs, Excel automatically adds the text indenting you want to include.

Conclusions

So far, you’ve learned the tried and tested methods to indent in Excel. You can use manual methods like Increase Indent, Format Cells, and Custom cell formatting codes to introduce indent occasionally to a small dataset.

If you’d like to try a little bit complex method but with more automation, you can try the formula-based methods that involve the ampersand symbol or the CHAR function.

Also, you’ve learned the technique to add indent spaces in texts or numbers for Excel objects like Text Boxes, SmartArts, Shapes, etc.

Finally, if you’re going to implement bulk indentation in your Excel worksheet, you can use the Excel VBA-based method.

If the article helped you in any way or you’ve got feedback about it, comment below.

About the Author

Tamal Das

Tamal Das

I'm a freelance writer at HowToExcel.org. After completing my MS in Science, I joined reputed IT consultancy companies to acquire hands-on knowledge of data analysis and data visualization techniques as a business analyst. Now, I'm a professional freelance content writer for everything Excel and its advanced support tools, like Power Pivot, Power Query, Office Scripts, and Excel VBA. I published many tutorials and how-to articles on Excel for sites like MakeUseOf, AddictiveTips, OnSheets, Technipages, and AppleToolBox. In weekends, I perform in-depth web search to learn the latest tricks and tips of Excel so I can write on these in the weekdays!

Related Posts

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃