Comments on: How to split text string in Excel by comma, space, character or mask

Splitting text from one cell into several cells is the task all Excel users are dealing with once in a while. Today, we are going to take an in-depth look at how you can break strings into different elements using formulas and the Split Text feature. Continue reading

Comments page 8. Total comments: 306

  1. Hi Svetlana,

    I have a worksheet containing a single column as follows:

    1 F01K2502F01L1504A23K1165

    2 C09J12518B23K524C07C30988C07C31724C07C31734

    I would like to split this single column into multiple columns, like:

    1 F01K2502 | F01L1504 | A23K1165 (3 columns)

    2 C09J12518 | B23K524C07 | C30988C07 | C31724C07 | C31734 (5 columns)

    Any advice?

    Thanks a lot beforehand.

    1. Hello,

      I'm afraid there's no easy way to solve your task with a formula. Using a VBA macro would be the best option here.

      However, since we do not cover the programming area (VBA-related questions), I can advice you to try and look for the solution in VBA sections on mrexcel.com or excelforum.com.

      Sorry I can't assist you better.

  2. Hi Svetlana,

    Thanks for your help on this. I hope you are still supporting this post.

    The left, mid & right functions only work for 3 columns of data within the source cell. My data has 6 columns with 5 delimiters (",").

    If I use LEFT it returns the "first column's data",
    If I use MID, it returns the "second column's data",
    If I use RIGHT, it returns everything to the right in column "3", which is actually Column 3, 4, 5 & 6.

    Is there any way to "count" the delimiters, then return the data before/after the specified Xth delimiter? In other words, similar to VLOOKUP where the formula uses "col_index_num" to specify which data is wanted.

    Unfortunately, the data I am trying to extract to place in 2 different cells is in the second & fourth columns.

    I have isolated below between *** ***

    12/15/2017 16:10,***DYSINGER EAST***,23326,***2163.11***,3150,-9999

    This is realtime data from .csv url through Data --> Refresh All, so using the Text to Columns feature or add-ins is not possible. Also I am using MS Excel for Mac, and so far cannot get Excel to recognize the "," in the text string as the delimiters to separate the string automatically into proper columns.

    Thanks for any help on this!

    1. Hello,
      Please try using a VBA macro. We are always ready to help you, but we do not cover the programming area (VBA-related questions).
      You may try to find the solution in VBA sections on mrexcel.com or excelforum.com.
      Sorry we can’t assist you better.

  3. Pls see if you can split the following, in Excel-2010 ...

    1 apple. 2 orange. 3 pear. 4 banana
    [this is all in a single cell]

    into ...

    column A column B
    1 apple
    2 orange
    3 pear
    4 banana

    Thank you.

    1. Hello,

      I'm afraid there's no easy way to solve your task with a formula. Using a VBA macro would be the best option here.

      However, since we do not cover the programming area (VBA-related questions), I can advice you to try and look for the solution in VBA sections on mrexcel.com or excelforum.com.

      Sorry I can't assist you better.

  4. how to split numbers as mentioned below?
    999999999.99 to 99 99 99 999.99;
    99999999.99 to 9 99 99 999.99;
    9999999.99 to 99 99 999.99;
    999999.99 to 9 99 999.99.
    and so on.

    Thanks in Advance.

    1. Hello,

      If I understand your task correctly, please try the following formula:

      =SUBSTITUTE(TEXT(A1,"#,##0.00"),","," ")

      Hope this will work for you

  5. i want to spit one cell number 12345

  6. My electrical engineer son-in-law is giving us a hint as to what he and my daughter are naming my grandson-to-be. Here is the strand he gave us ^[B-P][a,e,l,o,u]\w{3,} . He then added, "It's a string search pattern. It can be reverse engineered. Can anybody solve this for me?

  7. Hi,

    Can you help me splitting the word astro.forumattivo.com to astro and forumattivo.com

    thanks!
    skuty

  8. 08121804902
    hi there,
    081317003321
    081315004023
    08121002069
    08121803616
    08121001992
    081316000612
    081316002389
    08129000777
    08121002877
    can i ask help how to split between 12 digits & 11 digits different rows?

    1. Use LEN to return the length and test on that.
      =If(len(a1)>11,a1,"")

  9. Hi,
    Can you please help to seperate only the colours from the cell into different column.
    For eg.
    From PVC SLEEV 65X6 HEAVY DUTY BLACK COLOUR.Only the Black into different column.
    Like wise in given below contents:-
    PVC SLEEV 65X6 HEAVY DUTY BLACK COLOUR.
    PVC CISTERN WHITE
    PVC CISTERN-WHITE
    PVC CISTERN -WHITE

  10. Is it possible to slice Inputsome into various cells(Crore, Lac, Thousand, hundreds)?

    Inputsome Crore Lac Thousand Hundred
    1091050320 9 10 50 320
    173387930 17 33 87 930
    720333 7 20 333
    1209225 12 9 225
    3209 3 209
    16305 16 305
    502 502
    50 50
    9 9

  11. Hi...
    I am trying to use the split function in an Excel 2013 VBA script. However, the function name ('Split') is not highlighted in the editor, and I get a compile error "Cannot return array", so I suspect that the function has been removed.
    Could you please confirm that this is the case, or put me right if it isn't? I prefer not to have to write this function myself.. :)
    All the best, and thanks fo royur time,

  12. HTML 5 See 15 endorsements for HTML 515

    Unity3D See 11 endorsements for Unity3D11

    How to split this 15 and 11 in this line.

    ** number after "see" only i want.

  13. Y:O10111:5242045056:PPX :713907770199

    how to split in 4 column with removal of colon with formula.

    ex- 1st column=Y
    2ND COLUMN=O10111
    3 RD COLUMN=5242045056
    4TH COLUMN=PPX
    5TH COLUMN=713907770199 WITH EXCELL FORMULA.

  14. How to split string by line break in Excel

    AAA
    BBB
    CCC
    DDD
    EEE
    FFF
    GGG
    How to split string in DDD, EEE, FFF, GGG

  15. This is very helpful site for excel problems .... i used it .. and its good

  16. I Wanna break this strings RNY0HC3B282001573F14 in below mentioned pattern in different column, how i can using function please reply
    RNY0 HC 3B28 2 157 3 F 14

  17. Hello Svetlana,

    Thank you for your examples! I am trying to do this exact same thing, only in DAX for Power Pivot. My situation would be like your "Dress-Blie" example above, and I am trying to return "Dress"..

    John

  18. I am trying to split a column of e-mail addresses into 2 cols (E-MAIL1 and E-MAIL2), when the original column may have only a single address or may have 2 addresses separated by a comma, like: jdoe@dom.com, mdoe@dom.com"

    My problem is that SEARCH() and FIND() both seem to return #VALUE errors when there is only one e-mail address in the source column (and thus the "," can't be found.)

    Can I work around this by, for example, testing for an error (like if(SEARCH(",",sourcecol)=#VALUE, . . . etc.?)

    Or some other way?

    Thanks,
    Martin

  19. Hi
    I've been looking all morning to find a way to split out the following;-

    Amazon EU AMAZON.CO.UK LUX 99.99
    SPAR LOCHINVER LAIRG 99.99

    Can't split by fixed length, or delimiter, tried a macro to strip out text and then numbers but all costs end up as 9999 and not as a monetary amount.
    I have 12 months worth of old statements, about 1500 transactions, to reformat correctly. They are only available in as a pdf file not a csv which is what makes this a challenge.

    Any help, suggestions much appreciated.
    Thanks
    PFS

  20. michal jackson , BScIT, MCA, LLB, FAICD
    This is the given string . I want to split the string into two parts. That is I want to split BScIT, MCA, LLB, FAICD into degree part and michal jackson into name part.
    How should i do it.

  21. hi,

    I need to split the text in the string in different columns. Columns are fixed.

    For Example:

    Input String: Application_PROPAY , Area_Feeds, Assigned_to_PTS, Cause_Data Issue-Incorrect Data, Detected_RBS

    Output should be like: PROPAY should go to column name Application
    Feeds should go to column name Area
    PTS should go to Assigned to etc..

    In some cases all the column names might not have mentioned.. please help

  22. I have a character string, for example: GTHSYSKSSGSJSJGSUSKKS

    I want each character in its own column. How would I do that?

    Thanks

  23. Hello Svetlana,

    I need your help on this.
    Is there a way that I can split a string of text in a cell from

    "This is 2nd enquiry from this client. The 1st time wasSep-329 in Union TalkHusband's name: ChanWaiCheongTel:9*****"

    into

    "This is 2nd enquiry from this client. The 1st time wasSep-329 in Union Talk Husband's name: Chan Wai Cheong Tel:9*****"

    I have 44500 records having this problem. I tried doing a VBA code, to add space whenever there is a CAPs letter but it wont work for some records as the outcome will be: "paid via VISA" into "paid via V I S A"

    Please do help. Thank you.

    1. I have managed to solve this with a VBA Code.

      Function SplitCaps(strIn As String) As String
      Dim objRegex As Object
      Set objRegex = CreateObject("vbscript.regexp")
      With objRegex
      .Global = True
      .Pattern = "([a-z])([A-Z])"
      SplitCaps = .Replace(strIn, "$1 $2")
      End With
      End Function

      If any of you have another alternative please do share.

      Thanks

  24. Hello Svetlana,
    I like your information above, but as usual I have a different split column issue.
    So... I'm looking for a way to split a cell of text into to. The split must not come more that 30 characters (Including spaces) from the left but must be at a space or the immediate previous space to the 30th character point.

    So if the cell contained: "EMERGENCY MU/INITIAL FILL TO CONDENSER CTRL VAL"
    The 30th Character is the "C" of Condenser so the cell will split between "TO" and "Condenser"
    How do I write this code please?
    Many thanks for your help,
    Tim

  25. 1) face redness / Erythema (n);
    2) felt hot / Feeling hot (n);
    3) felt faint / Dizziness (n);
    4) dizziness / Dizziness (n);
    5) hands and feet weakness / Muscular weakness (n);
    6) arterial pressure increased to 140/70mmHg / Blood pressure systolic increased (n);
    7) flushes / Flushing (n);"

    The above data is a singe cell data i need to seperate from cell to column after every semicolon.
    While trying it on text to coloumn option of excel I cannot see any data getting shifted to the adjacent columns

  26. Hi, Ihave Query regarding Excel function.

    Iwant to split the Number after symbol For Ex:

    Putcharoen - Patumwan - T003
    Butthongkomvong - Muang - 5104
    Yim - Cheongju-si - 9573
    Hwang - Seongnam-Si - 3018

    so, from this i want values from the last symbol i.e. T003,5104,3018 like this ....

    Please provide me the Formula for this.

    Thanks in Advance

    Thanks,
    Adithya

  27. Can you help with Split string by dash:
    Item-Color-Size-FIT pattern, and you want to split the column into 4 separate columns?

    Item and color are the same as above. Having trouble with Size and FIT.

  28. Hi

    I want to split the below into columns
    90FB5B8F6B40
    001BBA9AB00
    001BBA99FE00

    I want my end result to be
    90:FB:5B:8F:6B:40
    00:1B:BA:A9:AB:00
    00:1B:BA:99:FE:00

    I thought if i can split the text to single columns and concatenate to join them back inserting the ":" that would help. So i needed to know how to separate the text string into columns. Is that possible?

    1. Based on your data being in A1, and always being the same length and expected return

      =LEFT(A1,2)&":"&MID(A1,3,2)&":"&MID(A1,5,2)&":"&MID(A1,7,2)&":"&MID(A1,9,2)&":"&MID(A1,11,2)

      if want them to be in separate column start with LEFT(A1,2)
      and then for every subsequent col copy the MID(A1,3,2) parts

  29. Hello Svetlana Cheusheva,

    Can you help me to extract "Fort Walton Beach", "Jacksonville Beach","Wethersfield",etc.
    These are examples:
    545 Ashley Court, Fort Walton Beach, FL 32547
    713 Arch Street, Jacksonville Beach, FL 32250
    341 Cardinal Drive, Wethersfield, CT 06109
    134 Main Street East, Anchorage, AK 99504
    211 Oak Lane, West Lafayette, IN 47906
    458 Williams Street, El Dorado, AR 71730
    913 Liberty Street, Saint Paul, MN 55104
    860 Somerset Drive, Acworth, GA 30101
    36 Briarwood Drive, Dekalb, IL 60115

    Thank you so much.

    Tien

    1. =MID(A10,FIND(",",A10)+2,(FIND(",",A10,FIND(",",A10)+1)-(FIND(",",A10)+2)))
      looks for the commas and uses mid to select the text between them.
      Assumes text is in A10.

  30. I have a long column of number letter combinations I want to split at the first letter (any letter)

    eg. 43245tre becomes 43245 tre
    129ftr becomes 129 ftr

    Help?

    1. Hello Mark,

      Do you want to split numbers and letters in 2 separate columns, or separate them with a space within a cell?

  31. what if we want to split my string e.g. or and. How do you specify split only when or or and is byitself and not part of a word. The below keeps happening.

    dog or cat slit into rows dog
    cat
    orange and apple or
    ange
    apple

    1. Hi Lila,

      You can use the 'Split by string' option of our add-in. When entering the delimiter strings, just be sure to type a space before and after or to prevent splitting words.

      And thank you for this great question! I will certainly include this tip in the article.

  32. 04 particulars in 04 row how we make the one coloumn. in excel
    1
    Name Address mail add phone no.
    Smt Anju Devi Dhanka, IND
    Bassi ( Jaipur)
    mlabassi2009[at]yahoo[dot]com
    M-8, Gandhi Nagar, Jaipur.,
    0141-6594942

    1. Hello Subhash,

      Sorry, your task is not quite clear. If you can send us a sample worksheet with the original data and expected result, our support team will try to help.

      1. Telephone error: Please enter the telephone number (area code and telephone number separated by a space or delimiter) AM STUCK

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 :)