+ Reply to Thread
Results 1 to 6 of 6

Remove text between quotes, variable length and number of quotes

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

    Remove text between quotes, variable length and number of quotes

    Hi all... I'm attempting to clean up some rather ugly strings, and would like to automate a process to clear out all the data with the exception of what's between quotations.

    The strings are variable length, and could have anywhere from 0 to 6 sets of quotations.

    For example

    From this
    Please Login or Register  to view this content.
    I want to be left with
    Please Login or Register  to view this content.
    Because this will sit in the middle of a larger macro, I'd much prefer to do this with vba code than a formula, but if the formula is the way to go, I can work with it.

    Thank you so much for any help!
    Last edited by JP Romano; 10-14-2011 at 09:51 AM. Reason: Resolved

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Remove text between quotes, variable length and number of quotes

    How's this for you?

    Please Login or Register  to view this content.

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

    Re: Remove text between quotes, variable length and number of quotes

    Made minor modifications and it worked like a charm. THANK YOU!

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Remove text between quotes, variable length and number of quotes

    Please Login or Register  to view this content.



  5. #5
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Remove text between quotes, variable length and number of quotes

    Ah, snb, we don't seem to have been in a thread together for a while. I've missed you, but then I've a real soft spot for any line of code that begins Join(Filter(Split(Replace

  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Remove text between quotes, variable length and number of quotes

    Not to mention where my soft spots lie....

+ 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