+ Reply to Thread
Results 1 to 7 of 7

remove text from string

Hybrid View

crj510 remove text from string 05-02-2011, 05:30 PM
TMS Re: remove text from string 05-02-2011, 05:52 PM
crj510 Re: remove text from string 05-05-2011, 09:58 AM
crj510 Re: remove text from string 05-05-2011, 11:35 AM
martindwilson Re: remove text from string 05-02-2011, 06:29 PM
TMS Re: remove text from string 05-05-2011, 02:34 PM
martindwilson Re: remove text from string 05-05-2011, 06:06 PM
  1. #1
    Registered User
    Join Date
    05-02-2011
    Location
    Des Moines, Iowa
    MS-Off Ver
    Excel 2010
    Posts
    3

    remove text from string

    Hi,

    I have a string that I want to remove some text from;

    11.2.B.9 XXXXXXXXXX - I want to remove the 2, the B, and the 9 separetly. The first number can be one or two digits, same with the second number, same with the third number. The letter is always a single letter. the text at the end is not consistent at all.

    here is the function I have to pull out the "2"...the problem is it does not work with a two digit number: =MID(A1,FIND(".",A1,FIND(".",A1))+1,FIND(".",A1,FIND(".",A1,FIND(".",A1,FIND(".",A1))))-2)

    I can figure out the rest of the parses if I can get some help pulling out the 2.

    thanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,440

    Re: remove text from string

    =--MID(A1,FIND(".",A1)+1,FIND(".",A1,FIND(".",A1)+1)-FIND(".",A1)-1)

    will make it numeric

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    05-02-2011
    Location
    Des Moines, Iowa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: remove text from string

    thanks for the help, it worked! It is actually for a calculated column in sharepoint, so text to column won't work here.

  4. #4
    Registered User
    Join Date
    05-02-2011
    Location
    Des Moines, Iowa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: remove text from string

    Any chances I can get some help on the rest of the functions I need? I am still wanting to get the "B" and the "9" out on their own from the question above.

    I have tried to figure this out, but my rookie excel skills are holding me back.

    thanks again!

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: remove text from string

    why not just parse it out using text to columns?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,440

    Re: remove text from string

    In order:

    =--LEFT(A1,FIND(".",A1)-1)
    =--MID(A1,  FIND(".",A1)+1,  FIND(".",A1,FIND(".",A1)+1)-FIND(".",A1)-1)
    =MID(A1,FIND(".",A1,FIND(".",A1)+1)+1,FIND(".",A1,FIND(".",A1,FIND(".",A1)+1)+1)-FIND(".",A1,FIND(".",A1)+1)-1)
    =--MID(A1,FIND(".",A1,FIND(".",A1,FIND(".",A1)+1)+1)+1,FIND(" ",A1) - FIND(".",A1,FIND(".",A1,FIND(".",A1)+1)+1) - 1)



    Regards
    Attached Files Attached Files

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: remove text from string

    so its calculated? are you splitting the calculated string? why not calculate each bit at source

+ 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