How to split cells in Excel: Text to Columns, Flash Fill and formulas

How do you split a cell in Excel? By using the Text to Columns feature, Flash Fill, formulas or Split Text tool. This tutorial outlines all the options to help you choose the technique best suited for your particular task.

Generally, you may need to divide cells in Excel in two cases. Most often, when you import data from some external source where all information is in one column while you want it in separate columns. Or, you may want to separate cells in an existing table for better filtering, sorting or a detailed analysis.

How to split cells in Excel using Text to Columns

The Text to Columns feature comes in really handy when you need to split cell contents into two or more cells. It allows separating text strings by a certain delimiter such as comma, semicolon or space as well as splitting strings of a fixed length. Let's see how each scenario works.

How to separate cells in Excel by delimiter

Suppose, you have a list of participants where a participant name, country and expected arrival date are all in the same column: Data in one cell to be split into several cells

What we want is to separate data in one cell into several cells such as First Name, Last Name, Country, Arrival Date and Status. To have it done, perform the following steps:

  1. If you want to place the results in the middle of your table, start by inserting a new column(s) to avoid overwriting your existing data. In this example, we have inserted 3 new columns like shown in the screenshot below: Insert a new column(s) to avoid overwriting your existing data. If you don't have any data next to the column you want to separate, skip this step.
  2. Select the cells you want to divide, navigate to the Data tab > Data Tools group, and click the Text to Columns button. Click Text to Columns on the Data tab.
  3. In the first step of the Convert Text to Columns wizard, you choose how to split cells - by delimiter or width.In our case, the cell contents are separated with spaces and commas, so we select Delimited, and click Next. Choose how to separate cells - by delimiter or width.
  4. In the next step, you specify the delimiters and, optionally, text qualifier.You can choose one or more predefined delimiters as well as type your own one in the Other box. In this example, we select Space and Comma: Choose one or more predefined delimiters or type your own one.

    Tips:

    • Treat consecutive delimiters as one. Be sure to select this option when your data may contain two or more delimiters in a row, e.g. when there are a few consecutive spaces between words or the data is separate by a comma and a space, like "Smith, John".
    • Specifying the text qualifier. Use this option when some text is enclosed in single or double quotes, and you'd like such portions of text to be inseparable. For example, if you choose a comma (,) as the delimiter and a quotation mark (") as the text qualifier, then any words enclosed in double quotes, e.g. "California, USA", will be put into one cell as California, USA. If you select {none} as the text qualifier, then "California will be distributed into one cell (together with an opening quotation mark) and USA" into another (together with a closing mark).
    • Data preview. Before you click the Next button, it stands to reason to scroll through the Data preview section to make sure Excel has split all cells contents right.
  5. Just two more things are left for you to do - choose the data format and specify where you want to paste the resulting values:
    • Data format. By default, the General format is set for all columns, which works well in most cases. In our example, we need the Data format for the arrival dates. To change the data format for a particular column, click on that column under Data preview to select it, and then choose one of the formats under Column data format (please see the screenshot below).
    • Destination. To tell Excel where you want to output the separated data, click the Collapse Dialog icon Collapse Dialog button next to the Destination box and select the top-leftmost cell of the destination range, or type a cell reference directly in the box. Please be very careful with this option, and make sure there are enough empty columns right to the destination cell. Set the desired format for split cells.

    Notes:

    • If you do not want to import some column that appears in the data preview, select that column and check Do not import column (skip) radio button under Column data format.
    • It is not possible to import the split data to another spreadsheet or workbook. If you attempt to do this, you will get the invalid destination error.
  6. Finally, click the Finish button and you are done! As shown in the below screenshot, Excel has perfectly placed the contents of one cell into several cells: Data in one cell is split into several cells.

How to split text of a fixed width

This section explains how to divide a cell in Excel based on the number of characters you specify. To make things easier to understand, please consider the following example.

Supposing, you have Product IDs and Product names in one column and you want to extract the IDs into a separate column: Product IDs and Product names to be separated into 2 columns

Since all of the product IDs contain 9 characters, the Fixed width option fits perfectly for the job:

  1. Start the Convert Text to Columns wizard as explained in the above example. In the first step of the wizard, choose Fixed width and click Next. Choose Fixed width and click Next.
  2. Set the width of each column by using the Data preview section. As shown in the screenshot below, a vertical line represents a column break, and to create a new break line, you simply click at the desired position (9 characters in our case): Set the columns' widths using the data preview section. To remove the break, double-click a line; to move a break in another position, simply drag the line with the mouse.
  3. In the next step, choose the data format and destination for the split cells exactly as we did in the previous example, and click the Finish button to complete the separation.

How to separate cells Excel with Flash Fill

Beginning with Excel 2013, you can make use of the Flash Fill feature that can not only automatically populate cells with data, but also split cell contents.

Let's take a column of data from our first example and see how Excel's Flash Fill can help us split a cell in half:

  1. Insert a new column next to the column with the original data and type the desired part of the text in the first cell (participant name in this example).
  2. Type the text in a couple more cells. As soon as Excel senses a pattern, it will populate similar data into other cells automatically. In our case, it's taken 3 cells for Excel to figure out a pattern: Separate cells in Excel with Flash Fill.
  3. If you are satisfied with what you see, press the Enter key, and all the names will be copied to a separate column at once.

How to split cell in Excel with formulas

Whatever diverse information your cells may contain, a formula to split a cell in Excel boils down to finding a position of the delimiter (comma, space, etc.) and extracting a substring before, after or in-between the delimiters. Generally, you'd use SEARCH or FIND functions to determine the delimiter's location and one of the Text functions (LEFT, RIGHT or MID) to get a substring.

For example, you'd use the following formulas to split data in cell A2 separated with a comma and space (please see the screenshot below):

To extract the name in B2:

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

Here, the SEARCH function determines the position of a comma in A2, and you subtract 1 from the result, because the comma itself is not expected in the output. The LEFT function extracts that number of characters from the start of the string.

To extract the country in C2:

=RIGHT(A2, LEN(A2)-SEARCH(",", A2)-1)

Here, the LEN function calculates the total length of the string, from which you subtract the position of the comma returned by SEARCH. Additionally, you subtract the space character (-1). The difference goes to the 2nd argument RIGHT, so it pulls that many characters from the end of the string.

The result will look as follows: DSplit the cell content using formulas

If your delimiter is a comma with or without space, you can use the following formula to extract a substring after it (where 1000 is the maximum number of characters to pull):

=TRIM(MID(A2, SEARCH(",", A2)+1, 1000))

As you see, there is no universal formula that could handle all kinds of strings. In each particular case, you will have to work out your own solution.

The good news is that the dynamic array functions that appeared in Excel 365 make the use of many old formulas unnecessary. Instead, you can use these functions:

  • TEXTSPLIT - split strings by any delimiter that you specify.
  • TEXTBEFORE - extract text before a specific character or substring.
  • TEXTAFTER - extract text after a certain character or word.

For more formula examples to divide cells in Excel, please check out the following resources:

Split cells using Split Text feature

Now that you are familiar with the inbuilt features, let me show you an alternative way to divide cells in Excel. I mean the Split Text tool included with our Ultimate Suite for Excel. It can perform the following operations:

  • Split cell by character
  • Split cell by string
  • Split cell by mask (pattern)

For example, splitting the participant details in one cell into several cells can be done in 2 quick steps:

  1. Select the cells you want to separate, and click the Split Text icon on the Ablebits Data tab, in the Text group. The Split Text tool
  2. On the add-in's pane, configure the following options:
    • Select Comma and Space as the delimiters.
    • Select the Treat consecutive delimiters as one check box.
    • Choose Split to columns.
    • Click the Split button.
    Splitting cells by comma and space as the delimiters

Done! Four new columns with the split data are inserted between the original columns, and you only need to give those columns appropriate names: The original cells are split into 4 separate columns.

Tip. To separate a column of names to the first name, last name and middle name, you can use a special Split Names tool.

If you are curious to see the Split Text and Split Names tools in action, we are welcome to use the download link below. I thank you for reading and hope to see you on our blog next week!

Available downloads

Ultimate Suite 14-day fully-functional version (.exe file)

189 comments

  1. How to extract number from text
    AP1P2L3E

  2. Rupesh(1-34)+SP(35-36)+Rupesh(37-41)+SP(42-48)+Rupesh(49-59)+SP(60)+Rupesh(61-90)+SP(91-96)+Rupesh(97-103)+SP(104-108)+Rupesh(109-115)+SP(116-120)+XD(121-144)

    How to take
    In a Column 1-34,37-41,49-59,61-90,97-103,109-115
    In next column 35-36,42-48,60,91-96,104-108,116-120
    and in next column 121-144

    Help me if you have any suggestion.

  3. how to split only number into that text(Hoshangabad121904Hasalpur)

  4. Superb article - managed to use the formulae so don't have to convert text to columns from a pivot every week!

  5. As i am exporting data from customised software to excel the work orders looks like
    30\EE-III\2016-17 1st part bill and
    30\EE-III\2016-17 2nd part bill
    now i want to remove 1st part bill using formula. at present i am using cursor to remove. please help ASAP

  6. i want to split a single cell in to two column
    how can possible

  7. I want separate text from number in Microsoft 2007

  8. How to split it a column and save into multiple spreadsheet?

  9. Hi, I have a query.

    From one of my reports, I get the name and employee number together in the same field. How can I separate the name and employee number?
    For example, in my report, I get the following:
    Assigned To
    Joylan Andrade G920526
    Rahul Dravid G456789

    But I want to split the cell to show Name separately and Employee Number separately and I want to do it for a list of names in the report.
    It should look like:
    Name Employee Number
    Joylan Andrade G920526
    Rahul Dravid G456789

    Please let me know if you can help :)

  10. I have a problem with the text is too big in a cell. The max. row height is 409 and text length is 3,147 chars in column "C"; let say Cells(19, "C"). How can I split this cells into multiple cells, maybe 3 or 4 cells so I can read the text. For example Cells(19, "C") with text length of 800 chars. Cells(20, "C") with the same length and Cells(21, "C") and so on until I can read the whole text by using
    Rows(index).EntireRow.Insert, etc.
    Please let me know.
    Thanks for your help,
    DU

  11. Dear Svetlana,

    We have data like 19 / 10 / 2011 and we just want only mid character. Please guide how to do it using formula. Please note that the given data are text format and values not dates..

    Awaiting ur reply

    Regards

    • Hi Pritesh,

      You can use a formula similar to this, where A2 is a text-date:
      =MID(A2, FIND("/",A2)+1, FIND("/", A2, FIND("/",A2)+1) - FIND("/",A2)-1)

      If you are curious to know the logic, you can find the detailed explanation here: How to extract N chars following a specific character.

      Please note, the result will also be a text sting. If you want a number, multiply the above formula by 1.

      • Would like to explain this formula for separation numeric value from text
        =IF((MID(FORMULATEXT($AH$7),43,10))="TODAY()-B3",IF($AH$7=$AH$10881,RIGHT(C121,10)*2/2,"tick such lamda"),CW121)

  12. Hello Svetlana...

    I have the data with alpha numeric like (RAVI MLKD 300 DD 93 KP 8.9 GG RT NI)
    from that i need the data before first numeric character (That is before 3).
    Ex: i want to split (RAVI MLKD ).

    • Hi Nani,

      You can use this formula, where A2 is the original alpha numeric string:
      =LEFT(A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A2&"0123456789"))-1)

      For the detailed explanation of the formula syntax and logic, please check out this example: How to split text and numbers in Excel.

  13. Hi,

    I want to know,how it possible are breaking excel cell in 2 part.

  14. hi I need help
    Is there anyway that Excel can split a single Cell in Half Vertically ??

    Joe

  15. Hi,

    need help, I have one coloum with numbers (123456), alpha-numeric (assd34df234). All these are in single coloum, say it "B". I want to separate them into other coloums.
    this is my data
    101928299
    101928300
    0E-XZCF-P14P
    9R-OKKD-FXDT
    9Y-FDRG-J4Z9
    A2-HTZQ-2QWY
    AN-5CAQ-BY9C
    DI-6YWX-52Z3
    DI-A4M7-52P1
    DP-U0N4-8B48
    E6-ORTJ-YCJ2
    101928301
    101928302
    101928303

    I want them in different coloums as per their type.

    thank you.

  16. Good morning or evening.
    I have a 2013 xlsx data sheet that one of the columns contains many characters per row. I need to import this data into a 3rd party software that limits that cell size to 60.
    I need to reduce each row's cell to 60 and then move the the next remaining 60 characters to the row below the first set of 60.
    Basically I am truncating the line and moving data to the next cell below the first cell.
    I am not sure how to do this task. The spreadsheet is 51 k lines and I hope to not to have to touch each line individually.

    Thank you for your consideration

  17. Dear, I have big amount of data regarding clients address. I was provided with 4 lines of address lines from the old system which we want to migrate into new system but he requirement is one address line should not be more than 30 characters.Usually people cramming most words in address line 1 and address line 4 is usually empty. How can I split the address among those 4 lines which each lines should not be more than 30 characters and without changing the meaning of the words?
    Thank you in advance.

  18. I have successfully split my text from numbers but I am now unable to format the numbers column, e.g. change to currency, add the column of numbers etc.

  19. "This amazing 3D light is safe, comforting, cordless and is loved by kids and adults alike!. Looks great on or off. Never gets hot to touch

    $Features & Functions$
    $Material: Plastic/LED bulb$
    $LED bulb included$
    $Design Origin: Canada$
    $License: Nickelodeon$
    $ Product Dimensions:L 48cm x W 25.5cm x H 25.5cm$
    $Product Weight: 1.78 kg"

    Please help me to split the above in to different cells separting at "$"

  20. I am looking to split a cell that contains for example,

    Linear Dimension (3.60 +0.04,-0.04)

    My goal is to split this one cell into 5 different cells containing

    Linear Dimension, 3.60, 0.04, -0.04 & 0.08

    The last being the difference between the upper and lower limits.

    Thank you!

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)