+ Reply to Thread
Results 1 to 4 of 4

Formula or code to remove values from string

  1. #1
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Formula or code to remove values from string

    Hi all,
    Having some trouble with the syntax to translate the content of a string. The string will always contain stock tickers, but the format varies. I need to normalize them into something like ticker(space)exchange code.

    For example, cell 1 can contain:
    ABC.EF US - I need to remove the .EF so I'm left with ABC US
    ABCDEF.GH TT - I need to remove the .GH so I'm left with ABCDEF TT

    The length of the part preceeding the "." will vary, as will the last two characters (the exchange code). I expect that there will always be two characters immediately after the "." which are to be removed.

    Thanks for any help!

    JP
    Last edited by JP Romano; 10-15-2009 at 08:55 AM.

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Formula or code to remove values from string

    In case there is always 1 DOT and 1 SPACE then
    Please Login or Register  to view this content.
    It takes the left part before the DOT and the right part after the SPACE
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula or code to remove values from string

    Try

    =Trim(Replace(A1,Find(".",A1),3,""))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Formula or code to remove values from string

    Excellent...thanks a million to both of you! Working like a charm.

+ 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