+ Reply to Thread
Results 1 to 18 of 18

Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

  1. #1
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    Looking for formula (Left, Right, Search, LEN, or SUBSTITUTE function) to split text in excel using formulas. See sample file. Desired outcome is in column B2:C5.

    Thanks
    Attached Files Attached Files
    Last edited by bjnockle; 07-12-2021 at 10:02 PM.

  2. #2
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,832

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    1. It's always best to attach a sample file and to include any type of exception you can think of and the results (see yellow banner at the top of the page).
    2. Are you sure you go that right? You just put a space between First and Name. Do you mean you want the First and last name from A2 and A3 into cell B2? And then you would want the first name from A4 and last name from A5 in cell B3?

  3. #3
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    Gregb11: Sample file attached. Desired outcome is in column B2:C5.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,832

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    I don't get it.
    In A2, if my first name is Thomas, how do you split that up into cells B2 and C2
    and if my last name is Hillhouse in cell A3, what would you want in cells B3 and C3? Please use real (sample) names in your example sheet.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,981

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    As Greg has implied, the sample data provided is utterly useless.

    It is such hard work every time trying to get usable sample worksheets out of you - you make it so very hard for anyone trying to help you. You need to provide REALISTIC samples.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    You posted a similar request a few days ago, and even allowing for the crassness of the data, you had the answer to rows 4 and 5. Plus, given the number of posts from you over the years on this same subject, you should be able to solve these yourself.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,981

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    Mmm ... I hadn't spotted the other similar thread. It's disappointing that no effort seems to be being made to learn from the help given over the years.

  8. #8
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    Gregb11: the actual texts I want to split are the four texts supplied in the sample file. I am not splitting anything else. Thus, what is contained in the sample file is my actual data, and the way it is lined up is how is it actually going to be lined up. Only need a formula to split them. Sorry if i did not properly explain this.Thanks

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    The point is if you have a string firstlast, how does Excel know that the answer is

    first last and not
    f irstlast or
    fi rstlast or
    fir stlast etc.

    It can't.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  10. #10
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    AliGW: My intention is not to make things hard for anyone of you guys because I know how tirelessly you guys work to help folks like me with their needs on this thread. I think i need to do a great job of properly explaining my problem-solving need with a good sample file. Thanks

  11. #11
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    Glenn Kennedy: Gregb11: the actual texts I want to split are the four texts supplied in the sample file. I am not splitting anything else. Thus, what is contained in the sample file is my actual data, and the way it is lined up is how is it actually going to be lined up. Only need a formula to split them. Sorry if i did not properly explain this. Thanks

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    My reply vanished!!

    If your string is FIRSTLAST, how can excel decide WHERE to put the break:

    F IRSTLAST
    FI RSTLAST
    FIR STLAST
    etc.

    It can't.

  13. #13
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,832

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    OK, in B2 you could enter this:

    =TRIM(LEFT(A2,LEN(A2)-4))

    In C2, you could enter this:
    =RIGHT(A2,4)

    Copy both down.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,981

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    ... the actual texts I want to split are the four texts supplied in the sample file. ... Thus, what is contained in the sample file is my actual data, and the way it is lined up is how is it actually going to be lined up.
    So what you are telling us, then, is that FIRST, LAST and NAME do not stand for anything else.

    Really???

  15. #15
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    Gregb11: great solution. Works like a charm. Thanks

  16. #16
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,000

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    AliGW: Yes, thanks

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,981

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    I'm flabbergasted! Why would you be dealing with a list of data like this? What's it for?

  18. #18
    Registered User
    Join Date
    07-10-2021
    Location
    GENEVA
    MS-Off Ver
    EXCEL FOR MAC MICROSOFT 365
    Posts
    80

    Re: Split Text in Excel Using formulas (Left, Right, Search, LEN, or SUBSTITUTE function)

    Quote Originally Posted by bjnockle View Post
    Looking for formula (Left, Right, Search, LEN, or SUBSTITUTE function) to split text in excel using formulas. See sample file. Desired outcome is in column B2:C5.

    Thanks
    bjnockle, your question is not clear enough to understand what you want to achieve, but taken at face value it looks like you always want column C to always have the last 4 letters, and column B should have all the characters excluding the last 4. If that is the case, the formula you want in cell B2 is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    , and the formula you want in cell C2 is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    .

    Please note that in the simple example I have shown there will be a trailing space in rows 4 and 5. If you want to trim the trailing space you can change B2 to
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    . I have added TRIM in the attached spreadsheet.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Extract Values using Left, Right, Mid, or Substitute Function
    By bjnockle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-08-2021, 02:46 PM
  2. Replies: 8
    Last Post: 05-06-2021, 03:33 PM
  3. [SOLVED] Left, Right, Mid, or Substitute function to separate values into desired columns
    By bjnockle in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-02-2021, 10:40 AM
  4. [SOLVED] Problem converting text to Excel date using LEFT and SUBSTITUTE
    By jrtaylor in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-29-2020, 05:23 PM
  5. [SOLVED] Extract texts from cell using SUBSTITUTE, RIGHT, LEFT, or MID FUNCTION
    By bjnockle in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-20-2020, 10:12 PM
  6. [SOLVED] How to replace or substitute function formulas but left the cell reference intact?
    By Franky alta in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-02-2016, 12:48 AM
  7. Substitute to the Search Function?
    By hekla149 in forum Excel General
    Replies: 3
    Last Post: 01-17-2011, 09:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1