+ Reply to Thread
Results 1 to 7 of 7

Extract Data between Spaces

  1. #1
    Forum Contributor
    Join Date
    09-01-2008
    Location
    Australia
    Posts
    108

    Extract Data between Spaces

    Hi All,
    I have a Excel Column
    e..g A1 = QT33865A1 8C1234 D3

    --> I only want 8C1234 to show on B1 ( next column)

    How do I only extract the middle portion? ( Between spaces)

    Any help is appreciated!

    Regards,
    Niron

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Extract Data between Spaces

    Hi niron,

    Use below formula in B1:-
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Contributor
    Join Date
    09-01-2008
    Location
    Australia
    Posts
    108

    Re: Extract Data between Spaces

    Thanks DILIPandey!
    You Rock! it works like magic! I'll update as solved.

    Best Regards,
    Niron

  4. #4
    Registered User
    Join Date
    09-02-2009
    Location
    Edinburgh, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: Extract Data between Spaces

    If the code is always of equal length you would use

    Please Login or Register  to view this content.
    But I suspect that is not the case. To extract the string between the first and second space in a string where the space position is not predefined you would use

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-02-2009
    Location
    Edinburgh, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: Extract Data between Spaces

    Oops too slow - ignore me!

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Extract Data between Spaces

    Or

    =MID(A1,FIND(" ",A1)+1,SUM(FIND({"^"," "},SUBSTITUTE(A1," ","^",2))*{1,-1})-1)

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Extract Data between Spaces

    You are welcome niron

    Cheers


    Regards,
    DILIPandey
    <click on below * if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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