Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Get Rid of Indent in Excel (Step-by-Step)

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To remove indentation in Excel, select the cells, open the Alignment tab of the Format Cells dialog (Ctrl+1), and set Indent to 0 under Horizontal alignment. If the indent comes from the Increase Indent button, you can also select the cells and press the Decrease Indent button on the Home tab until the text sits flush. For text that looks indented because of leading spaces, use Find and Replace or the TRIM function. The steps below cover each case, plus how to handle indentation that comes from styles, wrapped text, or imported data.

What You'll Need

  • Excel for Windows, Mac, or Excel for the web (labels and button locations can differ slightly by version, platform, and region).
  • The workbook containing the cells you want to fix.
  • Optional: a backup copy if you plan to use Find and Replace across a large sheet.

Step-by-Step

  1. Identify the type of indent. Click a cell that looks indented and look at the formula bar. If the text starts with spaces, the indent is character-based. If there are no leading spaces, the indent is a cell alignment setting. This determines which fix to use.
  2. Remove alignment indent with the ribbon. Select the cells (or the whole column). On the Home tab, in the Alignment group, click Decrease Indent. Each click removes one indent level. Repeat until the text is flush left. If the button is greyed out, the cell has no alignment indent.
  3. Remove alignment indent with Format Cells. Select the cells and press Ctrl+1 (Cmd+1 on Mac) to open Format Cells. Go to the Alignment tab. Under Horizontal, set Indent to 0. Click OK. This is the most reliable method because it resets the value directly rather than stepping down one level at a time.
  4. Remove leading spaces with Find and Replace. Select the range. Press Ctrl+H. In Find what, type a single space. In Replace with, leave it blank. Click Replace All. Be careful: this removes all spaces, including those between words. If you only want to remove leading spaces, use a formula instead (next step).
  5. Remove leading spaces with a formula. In an empty column, enter =TRIM(A1) (replace A1 with your first cell). TRIM removes leading and trailing spaces and collapses multiple spaces between words to one. Copy the formula down, then copy the results and paste as values over the original cells. Delete the helper column.
  6. Clear indentation from cell styles. If indentation returns after you retype, the cell may use a style with an indent. Select the cells, go to Home > Cell Styles, and apply Normal. Then reapply any formatting you need (font, borders, number format).
  7. Check for wrapped text and merged cells. Wrapped text can make a cell look indented when it is not. Select the cells and toggle Wrap Text off on the Home tab to check. Merged cells can also shift text visually; unmerge (Home > Merge & Center) if needed, then reapply alignment.
  8. Fix imported data. Data pasted from web pages or PDFs often carries non-breaking spaces or tabs. Select the column, use Data > Text to Columns with Delimited and Space as the delimiter to split and clean, or use =TRIM(SUBSTITUTE(A1,CHAR(160)," ")) to convert non-breaking spaces before trimming.
  9. Apply the fix to the whole sheet if needed. Click the Select All button (the triangle at the top-left corner of the grid), then set Indent to 0 in Format Cells. This resets alignment for every cell, but it also clears other horizontal alignment choices such as Center; reapply those afterward.
  10. Save and verify. Press Ctrl+S. Click a few previously indented cells and confirm the formula bar shows no leading spaces and the Alignment tab shows Indent 0.

Common Mistakes

  • Using Replace All with a space removes every space in the selected range, including spaces between words. Use TRIM or a targeted replace instead.
  • Clicking Decrease Indent on cells with no indent does nothing, which can look like the button is broken. Check Format Cells first.
  • Resetting the whole sheet wipes center or right alignment you wanted to keep. Work on selected ranges where possible.
  • Ignoring non-breaking spaces. A normal space replace will not remove CHAR(160), so the text still looks indented. Use SUBSTITUTE as shown above.
  • Forgetting that styles reapply indentation. If you retype into a styled cell, the indent can return. Apply the Normal style first.

Tips

  • Use Ctrl+1 to open Format Cells quickly; it works on Windows and Mac.
  • To find cells with leading spaces, use Find (Ctrl+F) with a space in the search box and look in Formulas, not Values.
  • If you only want a visual indent without changing data, use Increase Indent on a copy of the sheet rather than editing the source.
  • When cleaning imported data, work on a duplicate sheet so you can compare before and after.
  • For consistent formatting, set alignment on the column rather than individual cells.

Troubleshooting

  • Decrease Indent is greyed out: the cell has no alignment indent. Check for leading spaces in the formula bar.
  • Indent returns after editing: a cell style or conditional format is reapplying it. Apply Normal style and review Conditional Formatting rules.
  • Text still looks shifted after Indent is 0: check Wrap Text, merged cells, and column width. A narrow column with wrapped text can look indented.
  • Find and Replace does not remove the spaces: they may be non-breaking spaces. Use SUBSTITUTE with CHAR(160) as described in step 8.
  • Formula results show indentation: the source cell still contains spaces. Clean the source, then refresh the formula.
  • Whole-sheet reset changed alignment: undo with Ctrl+Z and reapply alignment only to the affected range.

Frequently Asked Questions

Why does my Excel text look indented when there are no spaces?

The cell has a horizontal alignment indent set. Open Format Cells (Ctrl+1) > Alignment and set Indent to 0.

How do I remove indentation from an entire column?

Click the column header to select it, then use Decrease Indent on the Home tab or set Indent to 0 in Format Cells.

Does TRIM remove all spaces?

No. TRIM removes leading and trailing spaces and reduces multiple internal spaces to one. It does not remove single spaces between words.

Can I remove indentation without a formula?

Yes. Use Decrease Indent or Format Cells for alignment indents, and Find and Replace for leading spaces (with the caveat about internal spaces).

Why does indentation come back after I retype?

The cell likely uses a style or conditional format that includes an indent. Apply the Normal cell style and check Conditional Formatting.

Does this work in Excel for the web?

Yes, the Alignment options and Decrease Indent button are available in Excel for the web, though the exact location of some commands can differ slightly from the desktop app.