+ Reply to Thread
Results 1 to 7 of 7

Extract data in excel between a string

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    Kathmandu, Nepal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Extract data in excel between a string

    I want to extract data in excel between a string in this format:
    ABCD 9999 (4200) (25)
    I want formula to separate all characters between spaces to place in individual cells:
    ABCD
    9999
    4200
    25.

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Extract data in excel between a string

    Do you want this data all in one column?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    02-05-2015
    Location
    Edmonton, Alberta
    MS-Off Ver
    2013
    Posts
    70

    Re: Extract data in excel between a string

    =LEFT(C3,FIND(" ",C3)-1)

    =MID(C3,MIN(FIND({0,1,2,3,4,5,6,7,8,9},C3&"0123456789")),FIND("(",C3)-1-MIN(FIND({0,1,2,3,4,5,6,7,8,9},C3&"0123456789")))

    =MID(C3,FIND("(",C3)+1,FIND(")",C3)-FIND("(",C3)-1)

    =MID(C3,FIND(")",C3)+3,LEN(C3)-3-FIND(")",C3))


    paste these in order and this is based if your information is in C3 if you need to see them in action here you go split numbers.xlsx


    if you think this helped let me know. this took a while to figure out


    EDIT I added a minus 1 to this formula because it was dragging a space after 9999
    Last edited by daveisalwayshere; 02-26-2015 at 12:32 AM.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extract data in excel between a string

    With one formula

    in B1 and pull formula to the right until you see blanks

    =TRIM(MID(SUBSTITUTE(" "&SUBSTITUTE(SUBSTITUTE($A1,"(",""),")","")," ",REPT(" ",125)),125*COLUMNS($A:A),125))

    Row\Col
    A
    B
    C
    D
    E
    1
    ABCD 9999 (4200) (25) ABCD 9999 4200 25
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Registered User
    Join Date
    02-05-2015
    Location
    Edmonton, Alberta
    MS-Off Ver
    2013
    Posts
    70

    Re: Extract data in excel between a string

    Quote Originally Posted by AlKey View Post
    With one formula

    in B1 and pull formula to the right until you see blanks

    =TRIM(MID(SUBSTITUTE(" "&SUBSTITUTE(SUBSTITUTE($A1,"(",""),")","")," ",REPT(" ",125)),125*COLUMNS($A:A),125))

    Row\Col
    A
    B
    C
    D
    E
    1
    ABCD 9999 (4200) (25) ABCD 9999 4200 25
    Ok thats cool what kind of voodoo do you use

  6. #6
    Registered User
    Join Date
    05-31-2012
    Location
    Kathmandu, Nepal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Extract data in excel between a string

    Thank you so much Alkey, that's awsome

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extract data in excel between a string

    You're welcome. Don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

+ 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. Extract data from different columns in an excel sheet and merge them as a string.
    By zrsansari in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-31-2012, 12:55 AM
  2. Extract Data from a string
    By dcaraher in forum Excel General
    Replies: 13
    Last Post: 12-15-2010, 10:13 AM
  3. Extract and consolidate data into string
    By BRISBANEBOB in forum Excel General
    Replies: 2
    Last Post: 07-22-2010, 02:21 AM
  4. How to extract data from a string?
    By bunster in forum Excel General
    Replies: 4
    Last Post: 04-20-2009, 06:17 AM
  5. [SOLVED] Extract data from String
    By SL in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-10-2006, 08:40 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