DEV Community

loading...

Join the Text From Two or More Cells Into One Cell in Excel!!

excelgeek profile image Andrews Originally published at geekexcel.com on ・3 min read

Sometimes you need to join the values from the different cells and return to a single cell with commas, the space character, or any other delimiter. Here is the tutorial to achieve this job. Let’s see how to join the text from two or more cells into one cell in Excel. Get an official version of ** MS Excel** from the following link: https://www.microsoft.com/en-in/microsoft-365/excel

Steps to join the text from two or more cells:

You can merge the text from two or more cells into one cell from the following methods.

Method 1:

  • To combine cells from a range to a cell with commas, just use the concatenation operator shown below.

=A1&”, “&B1&”, “&C1

  • CONCATENATE – It helps to join two or more text strings together and returns the result into one string. Read more on the CONCATENATE function.

Example:

  • Let’s see the below example image here we will show how to join the text using a comma symbol.

Concatenation operator
Concatenation operator

Method 2:

If some values in the cells are empty means, you can use the below formula to join the text.

=SUBSTITUTE(TRIM(A1&” “&B1&” “&C1))

Argument Explanations:

  • SUBSTITUTE – It will replace existing text with new text in a text string when you want to replace text based on its content, not position.
  • TRIM – This function helps to remove the extra spaces from the text and there is no space at the start or end of the text string.

Practical Example:

  • Let’s see how to join the text from the cells where the cells contain empty space.
  • Refer to the below example image. Here, you will see that there are multiple empty strings between words.

Input data
Input data

  • Apply the given formula, where you want to display the result.

Apply formula
Apply formula

  • It will remove the empty strings from the text and just leaves one comma between all words as per the below image.

Result
Result

Verdict:

Hope you understood how to join the text from two or more cells and return to one cell in Excel Office 365. Please state your queries in the below comment section. Thank you so much for visiting Geek Excel!!

Read Ahead:

Discussion (0)

pic
Editor guide