+ Reply to Thread
Results 1 to 4 of 4

delete those parts of string which start with x and ends with y

  1. #1
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    delete those parts of string which start with x and ends with y

    Hello,

    i have large list of strings in column A and need to clean them: Those parts of strings have to be deleted which start with "x" and end with "y". Where x is the content of single cell C1 and y is content of single cell D1.

    For example, if x is "<" and y is ">" then "Blase <f.>;Bouillon <\[bul'jɔ̃:\] österr.: \[bu'jɔ̃:\] f. 10>;Fleischbrühe <f.>;Sprudel <m.>,Bouillon2 <\[bul'jɔ̃:\] österr.: \[bu'jɔ̃:\] f. 10>>" should be cleaned to "Blase;Bouillon;Fleischbrühe;Sprudel,Bouillon2>".

    Dummy Data in attached file.

    Thank you in advance for your help.
    Attached Files Attached Files

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: delete those parts of string which start with x and ends with y

    This should do it, but test it first.


    Please Login or Register  to view this content.
    You could do that manually using the Find/Replace facility in Excel unless you need to integrate it into other code.
    Last edited by JLGWhiz; 01-29-2018 at 06:53 PM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    Re: delete those parts of string which start with x and ends with y

    Thank you very much. It does exaclty what i needed to. God bless you.

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: delete those parts of string which start with x and ends with y

    Quote Originally Posted by wali View Post
    Thank you very much. It does exaclty what i needed to. God bless you.
    You're welcome,
    Regards, JLG

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 04-27-2016, 05:18 AM
  2. [SOLVED] Split string and apply function on string parts
    By fandreacci in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-25-2015, 12:34 PM
  3. [SOLVED] Searching a string to see if two parts of the string are equal
    By cheal2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-18-2013, 09:58 AM
  4. [SOLVED] Check if string ends with one of the strings from an array
    By alienss in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-15-2013, 02:58 PM
  5. Delete whole if the cell ends with something
    By mthem2003 in forum Excel General
    Replies: 4
    Last Post: 08-18-2009, 09:16 PM
  6. [SOLVED] the ' symbol ends the SQL string, how do you replace it Excel
    By Valori in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2006, 09:50 PM
  7. [SOLVED] Manually delete cells not being used at ends of workbook
    By Woody13 in forum Excel General
    Replies: 3
    Last Post: 02-15-2006, 08:10 PM

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