To combine text from two Excel cells with a space between it, enter a formula in an empty cell. If the values are in A2 and B2, type =A2&" "&B2 and press Enter. The result joins the contents with one space, without changing the original cells. This is different from merging cells for layout, which can discard data.
Use a formula when you want a combined text result you can copy, sort, or use elsewhere. If your goal is only to make a heading appear across several columns, use Excel’s cell-merging controls instead—and check the warning about data loss below.
What You’ll Need
- An Excel workbook with the cells you want to combine. The examples use Excel for Microsoft 365 on Windows.
- An empty cell for the combined result. Keeping the source cells intact makes it easier to edit the original information later.
- The location of the text you want to join, such as a first name in A2 and a last name in B2.
The basic ampersand formula also works in Excel for Mac and Excel for the web. Ribbon wording and appearance can vary slightly by platform, but you can enter the same formula in a cell.
Step-by-Step
- Check the source cells. Identify the cells that contain the text and confirm their order. For example, if A2 contains “Maya” and B2 contains “Chen,” joining A2 first and B2 second gives a first-name-then-last-name result. Decide whether punctuation or a space should appear between each item.
- Select an empty cell for the result. Click a cell outside the source data, such as C2. Do not type the formula over A2 or B2, because that would replace the source information. If you are building a table, use a blank column beside the source columns and add a clear heading such as Full name.
- Enter the formula with a space separator. With the first item in A2 and the second in B2, enter
=A2&" "&B2in C2, then press Enter. The pair of quotation marks contains a single space; the ampersands join the cell values and that space into one text result. With Maya in A2 and Chen in B2, C2 displays “Maya Chen.” - Check the result before filling the rest of the column. Make sure the words appear in the intended order, with exactly one space between them. If you see the formula displayed literally rather than its result, check that the cell is not formatted as Text and that the formula starts with an equals sign. The troubleshooting section covers both issues.
- Copy the formula down for other rows. Select C2 and point to the small square at the lower-right corner of its selection border, called the fill handle. Drag the handle down alongside your data. Excel adjusts the row references automatically: the next row uses A3 and B3, then A4 and B4, and so on. Double-clicking the fill handle can fill down beside a neighboring column of continuous data.
- Join more than two cells if needed. Add another ampersand and another cell reference, with a quoted space between each item that should be separated. With a first name in A2, a middle name in B2, and a last name in C2, enter
=A2&" "&B2&" "&C2in D2. If the cells contain Maya, Elise, and Chen, respectively, the result is “Maya Elise Chen.” This direct approach is suitable when each source cell is filled in consistently. - Choose a blank-friendly option when some cells may be empty. A basic formula still inserts its specified spaces even if a source cell is blank, which can leave extra spaces at the start, end, or between items. With names in A2:C2 and a space desired between nonempty entries, enter
=TEXTJOIN(" ",TRUE,A2:C2)in D2. The TRUE setting tells TEXTJOIN to ignore empty cells, so Maya in A2, a blank B2, and Chen in C2 produce “Maya Chen.” TEXTJOIN is available in Microsoft 365 and recent Excel versions, including Excel 2019 and later. - Decide whether to keep a live formula or fixed text. A formula result updates if its source cells change. If you need a final text snapshot, copy the result cells, then use Home > Paste > Paste Values to replace the formulas with their displayed values. Do this only after checking the results, because values no longer update when the source cells change.
The ampersand method is usually the quickest way to add one space between two values. TEXTJOIN is more convenient for a range of cells when blanks are possible. Both methods create a text result in a separate cell; neither physically combines the source cells into one worksheet cell.
Common Mistakes
Using Merge & Center to join words. This command changes the cell layout; it does not concatenate the contents. If multiple selected cells contain data, Excel keeps the value in the upper-left cell and warns that the other contents will be discarded. Cancel if you need to preserve every value. Use a formula for text joining.
Leaving out the quoted space. Joining A2 and B2 directly produces text with no separator. The space must be included as text between quotation marks. Check that there is one actual space inside the quotation marks, not just a gap between parts of the formula.
Putting the formula in a source cell. A formula that refers to a cell and is entered into that same cell can cause a circular reference or overwrite the original content. Put the result in a separate, empty cell, then fill it down in the result column.
Forgetting that spaces are characters. If a source cell already starts or ends with spaces, adding another separator may make the output look uneven. Clean the source text or use a formula designed to trim unwanted spaces before joining. Also note that TEXTJOIN ignores empty cells, but a cell containing one or more spaces is not empty to Excel.
Expecting a formula result to be permanent. A joined formula remains linked to the source cells. If you edit a source value, the result changes too. Convert results to values only when you want to stop that relationship.
Tips
Pick the separator to suit the data. A space works for names and ordinary phrases. A comma followed by a space is useful for a city and region, while a hyphen can suit an identifier. Change the text between the quotation marks in the formula to the separator you need. Check the first few results before filling down, especially when punctuation matters.
Use TEXTJOIN for a variable number of entries. If you have several adjacent columns and some rows have missing middle names or optional details, TEXTJOIN can skip blank cells rather than leaving a separator for each blank. Its TRUE argument means ignore empty cells; FALSE includes empty positions and may create repeated separators. The separator is applied between included values, not automatically at the beginning or end.
Keep source columns until the output is verified. Retaining the original values gives you a way to correct spelling, change the separator, or rebuild the result. If you later need to remove the source columns, first check the output and consider pasting values into the result column. Deleting source cells that formulas depend on can change or break those results.
Use fill handles carefully. When you drag a formula down, Excel updates relative references by row. Confirm that each result uses the matching row’s source values. If the adjacent data column has blank rows, double-clicking the fill handle may stop early; drag it manually through the full intended range instead.
Remember the distinction between content and appearance. A formula creates a combined value in a new cell, which you can use in other formulas or export. Merge & Center changes the worksheet’s layout and alignment. For a title spanning columns, merging can be appropriate if the other selected cells are empty; for names, addresses, or other records, concatenate the contents instead.
Troubleshooting
The formula appears in the cell instead of a result: Select the cell and check Home > Number Format. If it is set to Text, change it to General, then re-enter the formula by pressing F2 and Enter. Also check that there is no apostrophe before the equals sign and that Show Formulas is not turned on. You can toggle Show Formulas with Ctrl+` on Windows; on a Mac, the shortcut can depend on the keyboard layout, so use the Formulas tab’s Show Formulas control.
The output has no space: Confirm that the separator is written as a quoted space in the formula and that the formula has not been edited to join the references directly. If the result is hard to inspect, click the result cell and read the formula in the formula bar.
The output has two or more spaces: Look for spaces already present at the end of the first source cell or the start of the next one. You can remove unintended spaces from the source data or clean the inputs before joining. If you use TEXTJOIN, remember that cells containing spaces are not treated as empty, even when they look blank on the sheet.
TEXTJOIN returns an error or is unavailable: Check your Excel version. TEXTJOIN is supported in Microsoft 365 and Excel 2019 or later, but may be missing from older releases. For two cells, use the ampersand approach instead. With A2 holding the first value and B2 the second, enter =A2&" "&B2 in C2; it will join those two values with a space, although it will not automatically skip a blank source cell.
The joined value changes after editing: That is normal for a formula. It recalculates from its source cells. If the result should stay fixed, copy it and choose Home > Paste > Paste Values. If the output changes unexpectedly, inspect the source cells and the row references in the formula.
Other cell contents disappeared after a merge: Undo immediately with Ctrl+Z on Windows or Command+Z on Mac if the action can still be undone. If you have continued editing, check whether the workbook has a prior saved version or a backup. Excel’s merge warning exists because contents outside the upper-left cell can be lost; merging is not a safe way to combine text.
Frequently Asked Questions
Can I combine cells and add a space without a formula?
Yes, Flash Fill can recognize a pattern. Type the desired combined result in the first row of an empty column, then choose Data > Flash Fill or press Ctrl+E on Windows. Review the filled results carefully: Flash Fill creates static text rather than a formula that updates when source values change. Availability and shortcuts can differ on Mac and Excel for the web.
Does Merge & Center add a space between cell values?
No. Merge & Center combines the selected cell area for layout and keeps only the upper-left cell’s content. It does not join the text from each cell. Use a concatenation formula when you need all the values in one text result.
How do I combine three cells with spaces between them?
Join the first value, a quoted space, the second value, another quoted space, and the third value. The Step-by-Step section shows the full formula and an example with a first, middle, and last name. If some entries can be blank, TEXTJOIN is generally more convenient.
Will the combined result update if I change a source cell?
Yes, if you keep it as a formula. Excel recalculates the result when a referenced cell changes. Paste the result as a value if you want a fixed text snapshot instead.
Can I use the same method on Mac or in Excel for the web?
Yes. The ampersand and TEXTJOIN formulas work in current Excel for Mac and Excel for the web. You can enter them directly into a cell; the Windows ribbon paths in this guide may look slightly different in another platform’s interface.
Related
- Clean Excel Data With Power Automate: A Practical Guide
- Clean Excel Columns: Remove Spaces, Duplicates, and Errors
- Clean Excel Data: Practical Steps, Tools, and Common Fixes
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Freeze Panes: Freeze More Than Just the Top RowNo—Excel’s Freeze Panes command is not limited to the top row. In Excel for Microsoft 365 on Windows,…
- Excel Zero Conditional Formatting: Highlight Zero ValuesTo highlight zero values in Excel, select the cells, then choose Home > Conditional Formatting > Highlight Cells…
- Wrap Text in Google Sheets on Mac: A Step-by-Step GuideTo wrap text in Google Sheets on a Mac, select the cell or cells, then choose Format >…
- Excel Goal Seek With Multiple Inputs: Use SolverExcel’s Goal Seek can change only one input cell at a time. To make a formula reach a…
- Unable to Add Page Numbers in Word? Fixes That WorkIf you’re unable to add page numbers in Word, click Insert > Page Number on Windows, choose a…
- Excel Mac: Distinct Count in a PivotTableExcel for Mac does not offer Distinct Count as a summary option in a standard PivotTable. On a…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.