The quickest way to concatenate in Excel and add a space between values is to use the ampersand operator with a space in quotes: =A1&" "&B1. This joins the contents of cells A1 and B1 with a single space in between. You can also use the CONCATENATE function, but the ampersand method is shorter and easier to read. This guide covers both methods, plus how to handle blank cells, trim extra spaces, and avoid common errors.
What You'll Need
- A computer with Microsoft Excel (2010 or later, including Microsoft 365). The steps work in Excel for Windows, Mac, and Excel for the web.
- A worksheet with data you want to join. For example, a column of first names and a column of last names.
- An empty cell where you want the combined result to appear.
Step-by-Step
Method 1: Using the Ampersand (&) Operator
- Click the cell where you want the combined text to appear. For instance, if your first name is in A2 and last name in B2, click C2.
- Type an equals sign (
=) to start the formula. - Click the first cell you want to combine (e.g., A2), or type its address.
- Type an ampersand (
&). - Type a space enclosed in double quotes:
" ". This is the literal space character. - Type another ampersand (
&). - Click the second cell (e.g., B2) or type its address.
- Press Enter. The result shows the first value, a space, and the second value. For example, "John Smith".
- To apply the same formula to other rows, drag the fill handle (the small square at the bottom-right corner of the cell) down, or double-click it if the adjacent column has data.
Your formula should look like this: =A2&" "&B2. You can extend it to more cells: =A2&" "&B2&" "&C2 joins three cells with spaces.
Method 2: Using the CONCATENATE Function
- Click the cell for the result.
- Type
=CONCATENATE(. - Click the first cell (e.g., A2), then type a comma (
,). - Type a space in quotes:
" ", then another comma. - Click the second cell (e.g., B2).
- Type a closing parenthesis
)and press Enter.
The formula looks like: =CONCATENATE(A2," ",B2). Note: CONCATENATE is still supported but Microsoft recommends the newer CONCAT function, which works similarly: =CONCAT(A2," ",B2). CONCAT also accepts a range, e.g., =CONCAT(A2:B2), but that would not insert spaces automatically.
Method 3: Using TEXTJOIN (for Multiple Cells or Ranges)
- If you have many cells to join with spaces, use
TEXTJOIN. It is available in Excel 2019, Excel 365, and Excel for the web. - Type
=TEXTJOIN(" ",TRUE,A2:C2). The first argument is the delimiter (a space in quotes). The second argumentTRUEtells Excel to ignore empty cells. The third is the range to join. - Press Enter. This joins all cells in A2:C2 with spaces, skipping blanks.
Adding a Space with Other Separators
You can combine spaces with commas, dashes, or other text. For example, to get "Smith, John" (last name, comma, space, first name), use: =B2&", "&A2. To add a dash between numbers: =A2&" - "&B2. The space is always inside the quotes along with any other punctuation.
Common Mistakes
- Forgetting the space in quotes: Using
=A2&B2gives "JohnSmith" with no space. Always include" "in the formula. - Using single quotes instead of double quotes: Excel requires double quotes for text strings.
' 'will not work. - Adding spaces manually in the cell references: Typing
=A2& B2(without quotes) treats the space as a syntax error. The space must be inside quotes. - Not using the ampersand correctly: The ampersand must be between each item.
=A2 B2is invalid. - Using CONCATENATE with a range:
=CONCATENATE(A2:B2)does not work in older Excel versions. UseCONCATor list each cell separately. - Leading or trailing spaces in source cells: If A2 contains "John " (with a trailing space), your result may have two spaces. Use
TRIMto clean up.
Tips
- To remove extra spaces from the result, wrap the formula in
TRIM:=TRIM(A2&" "&B2). This also removes leading and trailing spaces. - If you want the result as a static value (not a formula), copy the cell with the formula, then right-click > Paste Special > Values. This replaces the formula with the text.
- For a line break instead of a space, use
CHAR(10)as the delimiter:=A2&CHAR(10)&B2. Then enable Wrap Text on the cell to see the break. - If you are joining many cells,
TEXTJOINis more efficient and ignores blanks automatically. - To concatenate a range with spaces but keep blanks, use
TEXTJOIN(" ",FALSE,A2:C2)– the FALSE tells it to include empty cells as empty strings. - Use the Format Painter to copy the formula down a column quickly: select the cell with the formula, click Format Painter, then select the range.
Troubleshooting
Result Shows #NAME? Error
This usually means you typed the function name incorrectly (e.g., CONCATENAT) or used a function not available in your Excel version. Check the spelling. If you are using TEXTJOIN and it is not recognized, your Excel version may be older than 2019. Use CONCATENATE or the ampersand method instead.
Result Shows #VALUE! Error
This happens when one of the referenced cells contains an error, or when you have used an array incorrectly. Check the source cells for errors. If you are using TEXTJOIN with a range that includes errors, wrap each cell in IFERROR or use a different approach.
Result Shows 0 (Zero)
If a cell contains a number formatted as text, or if the cell is empty, Excel may display a 0. To avoid this, use TEXTJOIN with TRUE to ignore blanks, or use IF to handle blanks: =IF(A2="","",A2)&" "&IF(B2="","",B2).
Spaces Are Not Appearing
Check that you have included the space inside double quotes exactly as shown: " ". If you copied a formula from a webpage, the quotes might be curly quotes (smart quotes) instead of straight quotes. Replace them with straight double quotes.
Formula Shows as Text (e.g., =A2&" "&B2 appears literally)
This happens when the cell is formatted as Text. Select the cell, go to the Home tab, and set the number format to General. Then press F2 and Enter to recalculate. If the cell still shows the formula, check that you did not type an apostrophe before the equals sign.
Concatenated Result Is a Date or Number Without Spaces
If you are joining dates or numbers, Excel may convert them to their numeric serial values. To keep the original formatting, use the TEXT function: =TEXT(A2,"mm/dd/yyyy")&" "&B2. For numbers, use =TEXT(A2,"0")&" "&B2.
Frequently Asked Questions
What is the difference between CONCATENATE and CONCAT?
CONCATENATE is the older function and requires you to list each cell separately. CONCAT is the newer replacement that also accepts a range of cells, but it does not automatically insert a delimiter. Both work in Excel 2019 and later, but CONCAT is recommended by Microsoft.
Can I concatenate a whole column with spaces?
Yes, use TEXTJOIN: =TEXTJOIN(" ",TRUE,A:A) joins all non-empty cells in column A with spaces. However, be careful with whole-column references because they include the header and any stray data. It is better to specify a range like A2:A100.
How do I add a space after a comma in Excel?
Include the comma and space inside the quotes: =A2&", "&B2. This gives "John, Smith". The space is part of the text string.
Why does my concatenated formula show a number format like 44231?
Excel stores dates as serial numbers. When you concatenate a date cell, it uses the underlying number. Use the TEXT function to format the date: =TEXT(A2,"mm/dd/yyyy")&" "&B2.
Can I concatenate with a line break instead of a space?
Yes, use CHAR(10) as the delimiter: =A2&CHAR(10)&B2. Then turn on Wrap Text for the cell to display the line break.
Is there a way to concatenate without using a formula?
You can use Flash Fill (Excel 2013 and later). Type the desired result in a cell (e.g., "John Smith"), then press Ctrl+E to have Excel fill the rest based on the pattern. This works well for simple patterns but is not dynamic – if the source data changes, you must redo it.