How to combine text from two cells in excel
Tutor 5 (154 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To combine text from two cells in Excel, use the ampersand (&) operator, the CONCAT function, or the TEXTJOIN function.
Using the Ampersand (&) Operator
The ampersand operator joins text from multiple cells by placing & between cell references.
Basic Syntax:
Enter the formula =A1&B1 to merge text from cells A1 and B1.
Steps:
- Click the cell where you want the combined text to appear.
- Type = followed by the first cell reference.
- Type & after the cell reference.
- Type the second cell reference.
- Press Enter to complete the formula.
Adding Spaces Between Text:
Enter =A1&" "&B1 to insert a space between the combined values. The quotation marks contain the space character that appears between the text from both cells.
Windows and Mac Difference:
Both operating systems use identical syntax for the ampersand operator.
Using the CONCAT Function
CONCAT combines text from multiple cells into one cell.
Basic Syntax:
Enter =CONCAT(A1,B1) to merge text from cells A1 and B1.
Steps:
- Select the destination cell.
- Type =CONCAT(.
- Enter the first cell reference.
- Type a comma.
- Enter the second cell reference.
- Type the closing parenthesis.
- Press Enter.
Adding Delimiters:
Enter =CONCAT(A1," ",B1) to add a space between the text values. Place any delimiter character within quotation marks as a separate argument.
Windows and Mac Difference:
CONCAT functions identically on both platforms.
Using the TEXTJOIN Function
TEXTJOIN combines text from multiple cells with a specified delimiter between each value.
Basic Syntax:
Enter =TEXTJOIN(delimiter, ignore_empty, text1, [text2], ...) to merge text with automatic delimiter insertion.
Steps:
- Click the target cell.
- Type =TEXTJOIN(.
- Enter the delimiter in quotation marks (such as " " for space or "," for comma).
- Type a comma.
- Enter TRUE to skip empty cells or FALSE to include them.
- Type a comma.
- Enter the first cell reference or range.
- Add additional cell references separated by commas.
- Type the closing parenthesis.
- Press Enter.
Example Formula:
Enter =TEXTJOIN(" ",TRUE,A1:A5) to combine all text from cells A1 through A5 with spaces between each value, skipping any empty cells.
Windows and Mac Difference:
TEXTJOIN works the same way on both operating systems. This function requires Excel 2019 or later, or Microsoft 365 subscription on both platforms.
Combining Text with Numbers
Excel automatically converts numbers to text when using concatenation methods.
Enter =A1&B1 where A1 contains "Revenue: " and B1 contains 5000 to display "Revenue: 5000" in the result cell.
Formatting Numbers:
Use the TEXT function to control number formatting during concatenation.
Enter =A1&TEXT(B1,"$#,##0.00") to display the number from B1 with currency formatting. The format code within quotation marks determines how the number appears.
Combining Text from Multiple Cells
Using Multiple Ampersands:
Enter =A1&" "&B1&" "&C1 to join text from three cells with spaces between them. Add & between each cell reference and delimiter.
Using CONCAT with Ranges:
Enter =CONCAT(A1:C1) to merge all text from cells A1 through C1 without delimiters. CONCAT processes the range from left to right.
Using TEXTJOIN with Ranges:
Enter =TEXTJOIN(", ",TRUE,A1:C1) to combine cells A1 through C1 with comma-space separation. This method provides the most flexibility for combining multiple cells.
Flash Fill for Pattern Recognition
Flash Fill detects patterns and automatically combines text without formulas.
Steps:
- Type the desired combined result manually in the first cell of your target column.
- Press Enter to move to the next cell.
- Begin typing the second combined result.
- Press Ctrl+E (Windows) or Cmd+E (Mac) to trigger Flash Fill.
- Review the automatically filled values.
- Press Enter to accept or Esc to cancel.
Windows and Mac Difference:
Flash Fill uses Ctrl+E on Windows and Cmd+E on Mac. Flash Fill requires Excel 2013 or later on Windows and Excel 2016 or later on Mac.
Removing Extra Spaces
TRIM removes extra spaces from combined text.
Enter =TRIM(A1&" "&B1) to combine text and eliminate unnecessary spaces. TRIM keeps only single spaces between words and removes leading or trailing spaces.
Combining First and Last Names
Enter =A2&" "&B2 where A2 contains first names and B2 contains last names to create full names in a new column. Drag the fill handle down to apply the formula to multiple rows.
Alternative with TEXTJOIN:
Enter =TEXTJOIN(" ",TRUE,A2,B2) to achieve the same result with automatic empty cell handling.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to copy conditional formatting in excel
Answers · 1
How to multiply percentages in excel
Answers · 1
How to multiply all cells by a number in excel
Answers · 1
How to multiply by pi in excel
Answers · 1