+ Reply to Thread
Results 1 to 7 of 7

Extract data from a string - Varying length, between spaces

Hybrid View

  1. #1
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,695

    Re: Extract data from a string - Varying length, between spaces

    The formula should work assuming you have a single space between each piece of text. If there might be additional spaces try adding another TRIM function to Donkeyote's suggestion, i.e.

    =TRIM(MID(SUBSTITUTE(TRIM($A1)," ",REPT(" ",100)),1+(COLUMNS($B1:B1)-1)*100,100))

  2. #2
    Registered User
    Join Date
    09-06-2009
    Location
    Sussex, England
    MS-Off Ver
    Excel 2003 / Pocket Excel
    Posts
    6

    Re: Extract data from a string - Varying length, between spaces

    It's not happy about the brackets now...

    I'm off to bed before I do something silly and delete the lot.... LOL!

    L.

  3. #3
    Registered User
    Join Date
    09-06-2009
    Location
    Sussex, England
    MS-Off Ver
    Excel 2003 / Pocket Excel
    Posts
    6

    Wink Re: Extract data from a string - Varying length, between spaces

    SORTED!!!!

    Cheers for all your help guys, I had another look at this using a PC and Excel 2003 - The first formula worked as soon as I opened the file, I then copied it over to the PPC and it's looks to be working on there too now!

    Excellent forum!!!! L.

  4. #4
    Registered User
    Join Date
    06-11-2009
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Excel 2003
    Posts
    9

    Smile Re: Extract data from a string - Varying length, between spaces

    Quote Originally Posted by daddylonglegs View Post
    The formula should work assuming you have a single space between each piece of text. If there might be additional spaces try adding another TRIM function to Donkeyote's suggestion, i.e.

    =TRIM(MID(SUBSTITUTE(TRIM($A1)," ",REPT(" ",100)),1+(COLUMNS($B1:B1)-1)*100,100))
    Daddylonglegs:
    Every solution can be shared/used by multiple users. I was looking for exactly same (with slight difference) code & it solved my problems without posting!
    Last edited by Xalaal2009; 10-01-2009 at 02:51 PM. Reason: fix typo
    Abdi J. (Xalaal2009)
    Raiser's Edge Database App. Support/DBA
    Children's Hospital Foundation
    Saint Paul, Minnesota, USA
    http://www.araarso.com

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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