+ Reply to Thread
Results 1 to 3 of 3

delete middle part of text string

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,142

    delete middle part of text string

    I am looking for a formula to delete information from the middle of a text string. I have ~ 1,000 lines of data. Each text string is composed of the same way. The data I am looking for is two parts of the string (1) all the text up to and including the first % character (2) the last six characters. Thank you in advance for any comments. Examples as below:


    Raw Data
    CARDINAL HEALTH 5.5%13CARDINAL 5.513 CARDINAL HLTH 5.5 061513
    UST BILL 0%09US TREAS BILL 0%09 UST BILL 0.0 092409
    WORLD SAVINGS 4.125%09WORLD 4.125%09 WORLD SVGS 4.125 121509
    JP MORGAN 5.375%12JP 5.375%12 JPMORGAN CHS5.375 100112


    Desired Result
    CARDINAL HEALTH 5.5% 061513
    UST BILL 0% 092409
    WORLD SAVINGS 4.125% 121509
    JP MORGAN 5.375% 100112
    Last edited by maacmaac; 03-30-2009 at 03:59 PM.

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

    Re: delete middle part of text string

    Try:

    =LEFT(A1,FIND("%",A1))&RIGHT(A1,7)

    where A1 contains string to parse
    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.

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,142

    Re: delete middle part of text string

    Thanks for the quick reply. Much appreciated.

+ 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