Spaces & Whitespace
To type a literal space, just press the spacebar while editing the cell — no formula needed. Inside a formula, join two values with a space using =A1&" "&B1, or wrap a whole row in TEXTJOIN(" ",TRUE,A1:D1) to join several cells at once, skipping blanks. If a space needs to come from inside a formula rather than being typed, =CHAR(32) returns one. None of that helps data that already has extra spaces baked in: TRIM(A1) collapses repeated internal spaces to one and strips leading and trailing ones, though it won't touch a line break.
The formula
=A1&" "&B1 join two cells with one space between them
=TEXTJOIN(" ",TRUE,A1:D1) join a whole row with spaces, skipping blank cells
=CHAR(32) returns a plain space character
=TRIM(A1) collapses repeated spaces to one, strips leading/trailing
=SUBSTITUTE(A1," ","") removes every space, not just the extra onesA worked example
A2 holds "Jane" and B2 holds "Doe", and you want them combined with one space between them.
=A2&" "&B2
"Jane Doe" — a single space between the names. If A2 already had a trailing space typed into it, the result would show two spaces instead of one, which is exactly the kind of hidden character TRIM cleans up.
Which one do I need?
| If you want to… | Use |
|---|---|
| Typing a space directly into a cell | Just press the spacebar while editing — no formula needed |
| Joining two values with a space between them in a formula | =A1&" "&B1, or TEXTJOIN(" ",TRUE,range) to join more than two cells at once |
| A space needs to come from inside a formula, not typed as " " | =CHAR(32) returns a plain space character |
| Starting a new line inside the same cell, not a horizontal gap | Alt+Enter in Excel (Option+Return on Mac), Ctrl+Enter while editing in Google Sheets — then turn on Wrap Text to see both lines |
| The data already has doubled, leading or trailing spaces | =TRIM(A1) to collapse them to one, or =SUBSTITUTE(A1," ","") to remove every space |
Frequently asked questions
Why did a lookup formula fail on two cells that look identical?
An invisible trailing or leading space in one of the values is the usual cause — VLOOKUP, MATCH and exact-match IF formulas all compare characters exactly, so " Jane" and "Jane" count as different text. Wrap the lookup value in TRIM(), e.g. =VLOOKUP(TRIM(A1),B:C,2,FALSE), or clean the source column once with TRIM and paste the results as values.
Does adding a space work the same in Google Sheets?
Yes — &" "&, TEXTJOIN, CHAR(32), TRIM and SUBSTITUTE all behave identically in Google Sheets. The one difference is the new-line shortcut: Ctrl+Enter in Sheets versus Alt+Enter in Excel.
What's the difference between CHAR(32) and just typing " " in a formula?
None in the result — both return a plain space. CHAR(32) only matters when a space has to be built from a code rather than typed literally, such as inside a nested function assembling its own delimiter; for a normal formula, " " is simpler and does the same thing.
Why doesn't TRIM remove every space between words?
TRIM normalizes spacing rather than deleting it — it strips leading and trailing spaces and collapses any run of internal spaces down to exactly one, matching how most text is meant to look. To remove every space, including the single ones between words, use =SUBSTITUTE(A1," ","") instead.
New guides and tools, once a month
DE + EN · double opt-in · no spam