Results 1 to 11 of 11

replace values between specific characters

Threaded View

  1. #1
    Registered User
    Join Date
    07-09-2008
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    91

    replace values between specific characters

    hi,

    i have been trying to do the following but have not been successful. thanks in advance for helping!

    - i have lots of text strings on one worksheet
    - some text strings have <randomstring>, some even have multiple instances of <randomstring>, but others don't have a <randomstring> at all
    - what i want is remove anything within "<" and ">", including the operators "<" and ">"

    i have done this so far, with simple text functions, have each of the following lines in separate columns (text string column is "C"):
    D1=SEARCH("<",C1)
    E1=SEARCH(">",C1,D1)
    F1=REPLACE(C1,1,E1, )

    then because there might be multiple instances, i added:
    G1=SEARCH("<",F1)
    H1=SEARCH(">",F1,G1)
    I1=REPLACE(F1,1,H1, )

    problems and limitations of the above:
    - don't know how to loop to remove more than 2 instances
    - limited to removing "<" + "values within" + ">" from the beginning of the string only; don't know how to remove them if the "<randomstring>" is in the middle of the text string.

    sorry for the long explanation. thanks for the help!

    regards
    Last edited by hluk; 12-01-2009 at 05:39 PM.

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