How to Separate Two Words in Excel (6 Easy Ways)

The following image shows one of the ways to separate two words in Excel. Read on to learn more.

how to separate two words in excel


Let’s say we have a dataset containing a column of Full Name (consisting of a First Name and a Last Name), and we want to separate it into parts containing the First and Last Name.

sample dataset of names for spearation


Method 1 – Use Text to Columns Feature to Separate Words

STEPS:

  • Select the range of cells (B3:B12).
  • Go to the Data tab and select Data Tools.
  • Click on Text to Columns.

Use Text to Columns Feature to Separate Words in Excel

  • In the popup window, for Choose the file type that best describes your data, choose Delimited.
  • Click on Next.

Choosing the type of file type for the conversion.

  • Under Delimiters options, tick the Space option. Tick the box saying Treat consecutive delimiters as one.
  • Select Next.

Choosing the delimiters

  • Choose the resulting cell data format (i.e.Text). Select any Destination range you want the data to display (i.e. C5:D14).
  • Press Finish.

choosing column data format.

  • The outcome should be the same as the image below.

The final output of using text-to-column feature to separate names.

Read More: How to Split Text in Excel Using Formula


Method 2 – Combine LEFT, RIGHT, LEN, and SEARCH Functions for Splitting Words

STEPS:

  • Insert the below formula in the first blank cell (C5) for which you want to display the First Name:

=LEFT(B5, SEARCH(" ",B5,1))

  • Press Enter.

Use of LEFT and SEARCH function to get the first part of the name.

Formula Breakdown

  • SEARCH(” “,B5,1)): Inside the formula, the SEARCH function returns the string location (” “) of the text string in cell B5,
  • LEFT(B5, SEARCH(” “,B5,1)): LEFT function displays the text strings from the beginning of cell B5 to the space.
  • Drag the Fill Handle to fill in the entire column with the formula.

separating the first part of the name using the LEFT and SEARCH functions.

  • Paste the following formula in the first blank cell (D5) where you want to display the Last Name:

=RIGHT(B5,LEN(B5)-SEARCH(" ",B5,SEARCH("",B5)+1))

Use the Right, Len, and Search functions to get the second part of the name.

Formula Breakdown

  • SEARCH(” “,B5,1)): Inside the formula, the SEARCH function returns the string location (” “) of the text string in cell B5,
  • LEN(B5): Returns the length of the character in the cell B5.
  • RIGHT(B5,LEN(B5)-SEARCH(” “,B5,SEARCH(“”,B5)+1)): RIGHT function displays the text strings from the beginning of cell B5 to the space returned by the SEARCH function.
  • Hit Enter then drag the Fill Handle to copy the formula down.

The final output of using LEFT, RIGHT, LEN, and SEARCH functions to separate names.

Read More: How to Split Text by Number of Characters in Excel


Method 3 – Apply LEFT, RIGHT, LEN, and FIND Functions to Divide Words

STEPS:

  • Select C5 and copy the following formula:

=LEFT(B5,FIND(" ",B5)-1)

  • Press Enter.

Apply LEFT, RIGHT, LEN, and FIND Functions in Excel to separate Words

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.

  • Drag the Fill Handle to copy the formula across the column.

The first part of the name is separated using the LEFT and FIND functions.

  • Copy the following formula and paste it into D5:

=RIGHT(B5,LEN(B5)-FIND(" ",B5))

Enter RIGHT, LEN, and FIND formulas to separate the second part of the name.

Formula Breakdown

  • FIND(” “,B5): Inside the formula, the FIND function returns the string location (” “) of the text string in cell B5,
  • LEN(B5): Return the length of the string in cell B5.
  • RIGHT(B5,LEN(B5)-FIND(” “,B5)): RIGHT function displays the text strings from the end of cell B5 to the space.
  • Press Enter then drag the Fill Handle to fill the other cells.

The final output of using RIGHT, LEFT, LEN, and FIND functions to separate names in Excel.

Read More: How to Split Text by Space with Formula in Excel


Method 4 – Separate Two Words Through VBA Code

Before running the VBA Macro Code, the dataset looks like the image below.

STEPS:

  • Go to the Developer tab and click on Visual Basic. If you don’t have that, you have to enable the Developer tab. You can also press Alt + F11 to open the Visual Basic Editor.

Initialize VBA macro.

  • From the toolbar, click Insert and then Module.
  • In the Module, paste the following code, then press F5 to run it.
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

  • Go back to the worksheet.

The FInal output shows separate two words in name using the VBA macro in Excel.

Read More: How to Split First And Last Name in Excel


Method 5 – Utilize Excel Power Query Feature to Split Words

Steps:

  • Select the range of cells (B4:B14) you want to split.
  • Go to Data and select From Table (in the Get & Transform section).

Utilize Excel Power Query Feature to Separate two Words in Excel

  • This will bring out a popup window Create Table. Click on OK.
  • The Power Query Editor for Table 1 will appear. In the Home tab, click on the drop-down menu Split Column.
  • Select By Delimiter.

split column using the split column feature.

  • Another window named Split Column by Delimiter pops up.
  • Choose Space from the drop-down option Select or enter delimiter and None from the drop-down option Quote Character.
  • Click OK.

fixing delimiter and quote character

  • These steps generate a new worksheet next to PowerQuery that produces the split columns.

names split into two parts in the power query editor.

  • Go to the Home tab and select Close & Load.
  • Choose Close and Load To.

table loaded from the power query editor to the sheet.

  • After loading the table in a new worksheet, we can see that the names are now divided into two separate parts.

the final output of the power query feature showing in the sheet to separate two words in Excel.

Read More: Split String by Character in Excel


Method 6 – Separate Words Using Flash Fill Feature

Steps:

  • Type the First Name from B5 into C5.
  • Press Enter.
  • Select the range of cells C5:C14.
  • Go to Data and select Data Tools.
  • Choose Flash Fill.

Separate two Words Using Flash Fill Feature in Excel

  • The range of cell C5:C14 is filled with the first part of the name listed in the range of cells B5:B14.

first part of the name separated using the flash fill.

  • Repeat the same process for the next part of the name.

The final output of the name separate using the flash fill feature.

Read More: How to Split String by Length in Excel


Download Practice Workbook

Download this practice workbook to exercise.


Further Readings


<< Go Back to Splitting TextSplit in ExcelLearn Excel

Get FREE Advanced Excel Exercises with Solutions!
Maruf Islam
Maruf Islam

MARUF ISLAM is an excellent marine engineer who loves working with Excel and diving into VBA programming. For him, programming is like a superhero tool that saves time when dealing with data, files, and the internet. His skills go beyond the basics, including ABACUS, AutoCAD, Rhinoceros, Maxsurf, and Hydromax. He got his B.Sc in Naval Architecture & Marine Engineering from BUET, and now he's switched gears, working as a content developer. In this role, he creates techy content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo