Split String by Character in Excel (6 Suitable Ways)

The sample dataset below contains the Contact Information of random people where Name, Email Address and Contact Number are entered as a single string and separated by a character i.e. comma (,).We will split the string by character.

Dataset


Method 1 – Split String by Character Using LEFT and FIND Functions

Enter the following formula in an empty cell (C5).

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

The FIND function returns the position of the first comma (“,”) from the string B5 and the LEFT function extracts the characters from the string which is before the specific character (first comma). It will subtract 1 to extract excluding the comma.

  • Press ENTER.

Using LEFT and MID functions to split string by character in Excel

Fill Handle tool to split string by character in Excel

You will get the following output.

Final Output to split string by character in Excel

Read More: How to Split Text in Excel Using Formula


Method 2 – Applying MID and FIND functions to Split String

If you want to get the texts between two specific characters, you can use the MID function and the FIND function together. Enter the following formula in an empty cell (C5),

=MID(B5,FIND(",",B5)+1,FIND(",",B5,FIND(",",B5)+1)-FIND(",",B5)-1)

FIND(“,”, B6)+1 returns the starting position of the first character after the first comma. FIND(“,”, B5, FIND(“,”, B5)+1) returns the starting position of the first character after the second comma. -FIND(“,”, B5)-1 indicates that all the characters of the string after the second comma will be excluded. MID gives the characters between these two commas.

Applying MID, LEN and FIND functions to split string by character in Excel

  • Press ENTER and you will get the Email Address in cell C5.
  • Use the Fill Handle for the remaining cells to get all the Email Addresses.

Output of MID and FIND functions

Read More: How to Split Text in Excel by Character


Method 3 – Employing RIGHT, LEN, and FIND functions

The RIGHT function, the LEN function and the FIND function will split the string and extract the desired value after a specific character from that string. Enter the following formula in an empty cell (C5),

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

LEN(B5) calculates the total length of the string in cell B5. FIND(“,”, B5, FIND(“,”, B5)+1 finds the last comma and RIGHT extracts the characters after the last comma.

  • Press ENTER to get the Contact Number in cell C5.

Employing RIGHT, LEN, and FIND Functions to split string by character in Excel

  • Drag cell C5 and you will get all the Contact numbers by splitting the strings of column B.

Split String by character in EXcel

Read More: How to Split Text after a Certain Word in Excel


Method 4 – Incorporating SEARCH and LEFT functions to Split String

You can use the SEARCH function instead of the FIND function to split a string.

To split the Name from the string of cell B5, enter the following formula in an empty cell (B6),

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

The SEARCH function returns the position of the first comma (“,”) from the string B5 and the LEFT function extracts the characters from the string which is before the specific character (first comma). You have to subtract 1 to exclude the comma.

Press ENTER to get the Name in cell B6. Use the Fill Handle tool for the remaining cells.

Incorporating SEARCH and LEFT functions to Split String by character in Excel

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


Method 5 – Applying Flash Fill to Split String by Character

Enter the part of the string in a cell (C5).

Go to the Home tab >> Fill and select Flash Fill.

Flash Fill feature

Excel will automatically give the split string in all other cells of that column.

Enter the first Contact Number in cell D5 and navigate to the Home tab >> select Fill and choose Flash Fill.

Applying flash fill feature to split string by character in Excel

You will get an auto suggestion from Excel that fills the other cells of Contact Numbers.

Read More: How to Separate Two Words in Excel


Method 6 – Engaging Text to Columns Command

  • Select the entire dataset.
  • Go to the Data tab >> select Text to Columns from the Data Tools option.

Text to Columns command

  • Check Delimited in the Convert Text to Columns Wizard and click on Next.

Convert Text to Columns Wizard

  • Select Comma and click on Next.

Convert Text to Columns Wizard step 2

  • If your string is separated by any other character such as Tab, Semicolon or Space, you have to select that character. You can also enter other characters in the Other Select General and click on Finish.

Different parts of the string which were separated by the character comma, have been split into different cells.

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


Download Practice Workbook


Further Readings


<< Go Back to Splitting TextSplit in ExcelLearn Excel

Get FREE Advanced Excel Exercises with Solutions!
Prantick Bala
Prantick Bala

PRANTICK BALA is a marine engineer who loves exploring Excel and VBA programming. Programming, to him, is a time-saving tool for efficiently managing data, files, and internet tasks. He is proficient in Rhino3D, Maxsurf, C++, MS Office, AutoCAD, Excel, and VBA and goes beyond the basics. Armed with a B.Sc in Naval Architecture & Marine Engineering from BUET, he has transitioned into the role of a content developer. Beyond his work, find him immersed in books, exploring new... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo