To change how text appears spaced in Excel, select the cells and use Home > Alignment to adjust alignment, indentation, or wrapping. To remove unwanted spaces in the text itself, use =TRIM(A2) when the text to clean is in A2; Excel does not offer a general character-spacing or line-spacing setting for ordinary worksheet cells.
What text spacing means in Excel
People use “text spacing” to describe several different things: blank spaces typed into a value, the gap between text and a cell edge, the distance between lines, or the visual distribution of words across a cell. These are controlled in different ways. Formatting changes how content is displayed, while a formula such as TRIM changes the text stored in a cell.
That distinction matters when sorting, matching, or exporting data. A cell can look neatly aligned even though its underlying text contains extra spaces; conversely, clean text can look crowded because the column is narrow. Before changing anything, decide whether you need to alter the value or just improve its presentation.
- Extra spaces in a value: clean the text with a formula or edit the cell.
- Text too close to a border: use indentation or change the column width.
- Several lines in a cell: wrap text and adjust the row height.
- Text spread across a cell: try distributed alignment, keeping in mind that it changes presentation rather than inserting ordinary spaces.
Adjust apparent spacing with alignment
For a quick visual adjustment, select one or more cells and open Home > Alignment. The horizontal alignment buttons position text to the left, center, or right. These options move the text within the available cell width; they do not add spaces to the cell’s value. Alignment is useful for making labels and headings easier to scan without changing the data used by formulas.
For more control, open the Format Cells dialog. On Windows, press Ctrl+1 after selecting the cells, then choose the Alignment tab. On Mac, Command+1 opens Format Cells. Under Horizontal, options include Left, Center, Right, Fill, Justify, Center Across Selection, and Distributed (Indent). Under Vertical, options include Top, Center, Bottom, Justify, and Distributed. The available results depend on the cell’s size and contents.
Distributed alignment spreads text across the available cell space. It can help with short labels that otherwise sit at one side of a wide cell, but it may make a phrase look unusually stretched. Justify is intended to distribute text across multiple lines; it is most noticeable when a cell is wrapped. Neither option changes the actual words or reliably creates a fixed number of spaces between them.
Use indentation instead of typing leading spaces
If the goal is to move text away from the left edge, indentation is usually better than typing spaces before it. Select the cells and choose Home > Alignment > Increase Indent. Use Decrease Indent to move the text back. The exact buttons may be compact or grouped differently depending on the Excel window width, but they are in the Alignment group.
Indentation is formatting, so the cell still contains the original value. This makes it useful for displaying subcategories, such as placing detail rows slightly inward beneath a main heading. It also avoids problems that typed spaces can cause in lookups, sorting, and comparisons. If you need a genuine text prefix for an export or another system, add it as part of the value deliberately; do not use visual indentation as a substitute for data required by that system.
Another layout option is to widen the column or use Center Across Selection. The latter is available in the Format Cells Alignment tab and can center a heading across adjacent selected cells without merging them. It can be easier to manage than merged cells, which can interfere with selecting ranges, sorting, and some worksheet operations.
Control line spacing and wrapped text
Excel worksheet cells do not have a Word-style control for setting exact line spacing, such as 1.5 lines. To make a long entry readable, select the cells and choose Home > Alignment > Wrap Text. Excel displays the contents on multiple lines within the column width. The row may grow to show the wrapped text, and you can adjust the column width to change where lines break.
If a row does not show all its wrapped text, select it and use Home > Format > AutoFit Row Height, or drag the row boundary to make it taller. AutoFit may not behave as expected with merged cells; in that situation, unmerge the cells or set the row height manually. A manual height can also clip text if you later change the font, column width, or content.
To put a deliberate line break inside a cell while editing, place the insertion point where the break should go and press Alt+Enter on Windows. In Excel for Mac, use Control+Option+Return. This adds a new line within the same cell, rather than moving to the next cell. Wrap Text and row height then determine how that line appears.
Remove extra spaces from cell contents
TRIM is the usual starting point for cleaning ordinary spaces. With the text to clean in A2, enter this in another cell:
=TRIM(A2)
If A2 contains the text North Ridge with two leading spaces, three between the words, and two at the end, the result is North Ridge. TRIM removes leading and trailing standard spaces and reduces runs of standard spaces between words to one. It does not remove every possible invisible character, and it does not change A2 unless you later replace the original value with the result.
For a column, fill the formula down alongside the source data, check the results, and then copy the cleaned cells. To replace the originals with the cleaned text, use Paste Special > Values over the original range. Keep a copy of the source data first if the original spacing may matter. If the values are used in formulas or imported into another system, check that replacing them will not disrupt dependent work.
Handle nonbreaking and invisible spaces
A common reason TRIM appears not to work is that the gap is not a standard space. Web pages and some exported files use a nonbreaking space, often represented by character code 160. It can look like an ordinary space but remain in the value after TRIM. A formula can replace that character with a standard space before trimming.
With the imported text in A2, use:
=TRIM(SUBSTITUTE(A2,CHAR(160)," "))
For example, if A2 contains North, a nonbreaking space, and Ridge, the formula returns North Ridge with one standard space between the words. SUBSTITUTE replaces character 160 with a regular space, and TRIM then removes extra leading, trailing, or repeated standard spaces. This handles a frequent import issue, but not every possible Unicode character or formatting mark.
For other nonprinting characters, CLEAN may help. It removes many nonprinting characters from text, but it is not a universal Unicode cleanup tool and does not remove every unusual space. If data still fails to match after cleaning, inspect the source and test a small sample before applying a broad replacement. A visually identical character can have a different underlying code.
When to change the text rather than the formatting
Use formatting when the value is correct but the worksheet needs a clearer layout. Use a cleaning formula when extra spaces are accidental and interfere with matching, counting, or consistency. Use literal spaces in a value only when the spaces are part of the required text—for example, when preparing a fixed-width text file whose receiving system specifies exact positions.
For ordinary tables, avoid padding labels with repeated spaces to line up columns. The alignment can change when fonts, column widths, or devices change, and the added spaces become part of the value. Separate information into different columns where possible, then set the columns’ widths and alignments. That structure is easier to sort, filter, and analyze.
Similarly, do not add spaces to make numbers appear centered or to create visual gaps in a report. Use cell alignment, indentation, column width, and borders for layout. If you are preparing a text export with strict spacing requirements, verify the exported file itself because worksheet display formatting does not necessarily become part of the exported text.
Common spacing problems and fixes
- Two entries look the same but do not match: check for leading, trailing, repeated, or nonbreaking spaces. Try TRIM first, then test for character 160 if the data came from a web page or export.
- Text appears cut off: widen the column, turn on Wrap Text, or increase the row height. Right-side content may also be visually blocked by a nonempty neighboring cell.
- Words look spread apart: check whether Distributed or Justify alignment is selected. Change Horizontal alignment to Left or General if that suits the cell.
- Indentation does not move text as expected: review the horizontal alignment and indent setting in Format Cells. Some alignment choices affect how indentation appears.
- Wrapped text is clipped: use AutoFit Row Height or set a larger height, and check whether the cell is merged.
- TRIM leaves a strange gap: the character may not be a standard space. Try replacing CHAR(160), or inspect and clean the source data more specifically.
Frequently Asked Questions
Can I increase letter spacing in an Excel cell?
Excel does not provide a general character-spacing control for ordinary worksheet cells. You can change the font, size, alignment, indentation, or column width, but these are not equivalent to adjusting tracking between individual letters. A text box may offer different text-formatting options, depending on the selected object and Excel version.
How do I add space between words in Excel?
If you mean a real space in the text, edit the cell or use a formula that joins text with a standard space. If you only want the text to look less crowded, adjust the column width or alignment instead. Visual formatting is usually safer for data that will be sorted or matched.
Why does TRIM not remove all spaces?
TRIM handles standard spaces, not every character that looks like a space. Imported content may contain nonbreaking spaces or other Unicode characters. Replacing CHAR(160) with a standard space before TRIM fixes one common case, but the source may contain a different character.
How do I add more space between lines in a cell?
Excel has no exact line-spacing setting for worksheet cells. Turn on Wrap Text, change the column width to influence line breaks, and increase the row height to provide more room. You can insert a manual line break while editing, but that does not set a line-spacing measurement.
Does indentation add spaces to the cell value?
No. Indentation changes the cell’s display formatting, not the text stored in it. This is why it is generally preferable to typing spaces before a label when the aim is only to move the label away from the cell edge.
Related
- Data Validation Multiple Selection in Excel: What Works
- Data Validation Interview Questions and Strong Answers
- Data Validation Greyed Out in Excel? Causes and Fixes
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Add a Dropdown in Google Sheets: Step-by-Step GuideTo add a dropdown in Google Sheets in a web browser, select the cell or cells, choose Insert…
- Create an Email Distribution List in Outlook 365To create an email distribution list in Outlook 365, open People and choose New contact list in new…
- Create a Distribution List in Outlook for Mac: StepsTo create a distribution list in Outlook for Mac, open People, choose New Contact List, name the list,…
- Conditional Formatting Excel Whole Row: A Practical GuideYes. To format a whole row in Excel based on one cell, select the rows’ data range, choose…
- How to Split Screen in Google Sheets for Side-by-Side ViewsTo split a Google Sheets view, open the same spreadsheet in two browser windows, move each window to…
- How to Create a Signature Footer in Outlook for EmailTo create a signature footer in Outlook, open the signature settings for your version of Outlook, create and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.