Separating two words in Excel is quite handy in order to extract data from a dataset. In this article, we use LEFT, RIGHT, LEN, SEARCH, FIND functions, various Excel features as well as VBA Macro Code to separate two words in Excel.
Among those methods, the Text to Columns feature is one of them. The following image shows the use of it for separating two words in Excel.
How to Separate Two Words in Excel: 6 Easy Ways
Let’s say, we have a dataset containing a column of Full Name (consisting of First Name and Last Name), we want Full Name into two separate columns containing the First and Last Name. We will separate the name into two separate parts. For avoiding any compatibility issues, opt to use Excel 365 edition.
1. Use Text to Columns Feature to Separate Words
We can separate the Full Name column into two columns via the Text to Columns feature resulting in First Name and Last Name as two individual columns. Therefore, follow the below steps to complete the task.
STEPS:
- Select the range of cells (B3:B12).
- Then go to Data>Click on Text to Columns.
- A window will pop up. In the popup window, Click Choose the file that best describes your data as Delimited. Afterward, click on Next.
- Another window will come up. In that window, under Delimiters options Tick the Space option. Also, Tick the box saying Treat consecutive delimiters as one. Again, Select Next.
- It is necessary to tick the box saying Treat consecutive delimiters as one because while inputting data users might place too many spaces between words. If the box remained Unticked the outcome will be merely two split cells with nothing but spaces in them.
- Choose the outcome Cell Data Format (i.e.Text). Also, select any Destination range you want the data to display (i.e.C5:D15).
- Press the Finish button.
- The outcome will be the same as the image below.
From the image, you can see the Full Name column gets split into two different columns depicting the First and Last Name separately.
Read More: How to Split Text in Excel Using Formula
2. Combine LEFT, RIGHT, LEN, and SEARCH Functions for Splitting Words
The LEFT function extracts text strings from cell references. The RIGHT function extract text from the right side of the text. Combining these two functions with the SEARCH function can fetch data as First and Last Names separately.
STEPS:
- Insert the below formula in any blank cell (C5) you want to display the First Name.
=LEFT(B5, SEARCH(" ",B5,1))
- Press ENTER after this.
🔍 Formula Breakdown 🔍 Formula Breakdown Read More: How to Split Text by Number of Characters in Excel We can use a combination of multiple functions to manipulate data from a dataset. A combination of LEFT and Find can extract a word from in any cell. On the other hand, combined RIGHT, LEN, and FIND functions fetch a word from the right side of any text string. STEPS: 🔍 Formula Breakdown ➢ FIND(” “,B5): Inside the formula, the FIND function returns the string location (” “) of the text string in cell B5, ➢ LEFT(B5,FIND(” “,B5)-1): LEFT function displays the text strings from the beginning of cell B5 to the space. 🔍 Formula Breakdown Read More: How to Split Text by Space with Formula in Excel We can use a simple VBA Macro Code to generate separate columns attributed to First and Last Names. Before running the VBA Macro Code, the dataset looks like the image below. STEPS: Read More: How to Split First And Last Name in Excel Power Query split column using a delimiter. Thus, we can use Power Query to split the Full Name column into two individual columns. Steps: Read More: Split String by Character in Excel Excel has a tendency to predict entries that are input before. By manipulating Excel’s behavior, we can insert data much easier into two different columns. In this case, we use Flash Fill to do so to separate two words in Excel. Steps: Read More: How to Split String by Length in Excel Download Practice Workbook Download this practice workbook to exercise.
In this article we use functions such as LEFT, RIGHT, LEN, FIND and SEARCH as well as features and VBA Macro Code. The usage of combined functions has a prerequisite of understanding character and their spacing. Features like Text to Columns and Flash Fill do not require such things. Power Query and VBA Macro Code are exceptional in their aspects. Hope you find the steps lucid enough to follow. Comment if you have further queries regarding the methods or want to add something.Feel free to ask any questions or feedback through the comment section.=RIGHT(B5,LEN(B5)-SEARCH(" ",B5,SEARCH("",B5)+1))
3. Apply LEFT, RIGHT, LEN, and FIND Functions to Divide Words
=LEFT(B5,FIND(" ",B5)-1)
=RIGHT(B5,LEN(B5)-FIND(" ",B5))
4. Separate Two Words Through VBA Code
Sub Word_Separate()
Dim Xarray() As String, C As Long, x As Variant
For n = 5 To 14
Xarray = Split(Cells(n, 2), ",")
C = 3
For Each x In Xarray
Cells(n, C) = x
C = C + 1
Next x
Next n
End Sub
5. Utilize Excel Power Query Feature to Split Words
6. Separate Words Using Flash Fill Feature
Conclusion
Further Readings