+ Reply to Thread
Results 1 to 7 of 7

Mid after semi colon before space

  1. #1
    Registered User
    Join Date
    05-15-2019
    Location
    Des Moines, Iowa
    MS-Off Ver
    Office 365
    Posts
    43

    Mid after semi colon before space

    Is there a formula that can be used to extract data after a semi-colon and before a space or no space? For instance all I want are the first names in a table such as below:

    MCCOY;MICHAEL GENE I only want Michael
    MAURATH;ANTON J. I only want Anton
    SUNDINE;LAURA B. I only want Laura
    TELLINGHUISEN;JANINE I only want Janine
    MEYN;KENT A. I only want Kent

    I know how to do Mid formulas, but I don't know how to do this when there are multiple variable because I don't know the number of characters after the semicolon or in Janine's case there isn't a space because there isn't a middle initial.

    Thanks,

  2. #2
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Mid after semi colon before space

    Assuming your text starts in A1, try:
    Please Login or Register  to view this content.
    If someone helped achieve your solution, consider clicking "* Add Reputation" on their post.

    If your question has been answered, mark the thread as [SOLVED] using the Thread Tools menu at the top of the thread.

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Mid after semi colon before space

    @Melvosh, you forgot to trap the FIND() error when there is no space

    @tonym, see if this does what you need
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Mid after semi colon before space

    Aggh, it doesn't work, I didn't strip out the other text. I was rather shocked when it did seem to work, couldn't really figure out why.

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Mid after semi colon before space

    Quote Originally Posted by Melvosh View Post
    I was rather shocked when it did seem to work
    I know that feeling well, you think that you've got the perfect solution, then as soon as you post it, everyone sees your mistake(s)
    Many times I've realised it as soon as I've submitted my reply, then had to do a very fast edit before anyine notices

  6. #6
    Valued Forum Contributor
    Join Date
    12-14-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    439

    Re: Mid after semi colon before space

    @jason.b75: Your formula is incorrect if the string has a space before the first semi-colon.
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Mid after semi colon before space

    Quote Originally Posted by huuthang_bd View Post
    @jason.b75: Your formula is incorrect if the string has a space before the first semi-colon.
    Or if there is more than one semi-colon in the string.

    The formula gives the results that the OP has asked for in the examples provided.

    None of the examples provided have more than one semi-colon, or any spaces before the first semi-colon, the information provided suggests that the fomat of all data should be consistent with the example, so I based the formula on those facts and the priniple of Occam's razor (if you don't know what that is, google will tell you).

    My comment to Melvosh was to point out that their formula would produce an error with one of the samples provided (the sample with no space after the semi-colon would result in #VALUE!), not that it might not work with data that doesn't match the samples provided.
    Last edited by jason.b75; 05-29-2019 at 02:50 AM.

+ 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] Semi Colon not Comma why
    By Derrick T. Davidson in forum Excel General
    Replies: 5
    Last Post: 12-08-2015, 02:35 AM
  2. [SOLVED] If formula for text before and after a semi colon
    By charlesonmission in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-21-2015, 05:39 PM
  3. Separating semi-colon between numbers.
    By ae.chun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2013, 10:42 PM
  4. [SOLVED] Problem with syntax within semi colon
    By nironto in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-10-2013, 02:10 AM
  5. add a semi colon after each email address
    By loniponi2000 in forum Excel General
    Replies: 1
    Last Post: 08-16-2012, 11:16 AM
  6. How to add semi colon : ?
    By OceanBlue in forum Excel General
    Replies: 4
    Last Post: 04-27-2011, 08:25 PM
  7. convert time without using a semi colon
    By daznav in forum Excel General
    Replies: 6
    Last Post: 07-23-2010, 02:18 AM

Tags for this Thread

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